See Design Pattern: Associated Items for answer to your specific question.
You can simplify your switch statement a bit:
switch triggeringItem.state.toString {
case "WERK": hsb = "30,60,100"
case "GEZEL": hsb = "20,100,49"
...
See Design Pattern: Associated Items for answer to your specific question.
You can simplify your switch statement a bit:
switch triggeringItem.state.toString {
case "WERK": hsb = "30,60,100"
case "GEZEL": hsb = "20,100,49"
...