Hello everyone,
I need to write a rule to control my light bulbs from homekit. Let me explain in a better way.
I have set my items file and everything work correctly
`//This is the Items File
//Lights
Color MilightrgbLed0color “Tutte le luci” [ “Lighting” ] {channe$
Color MilightrgbLed1color “Scrivania” [ “Lighting” ] {channel="m$
Color MilightrgbLed2color “Divano” [ “Lighting” ] {channel="mili$
Color MilightrgbLed3color “Sinistra” [ “Lighting” ] {channel="mi$
Color MilightrgbLed4color “Destra” [ “Lighting” ] {channel="mili$
`
I need a rule that let me control the status of lights 1, 2, 3, 4 with the toggles of 0 that group all the lights. For example I want that when I switch ON “0”, the switches on the sitemap and in home app of 1, 2, 3, 4 turn ON. Same thing for color change and dimmer.
Another question is: when I use home app and I want to change a color of a light bulb, why it’s easy to switch from red to blue, to green and when I switch from a color to white and from white to a color I can’t do that? I must change the saturation or the color on the sitemap.
Last question: is it possible to add a blank space in the sitemap?
If you actually want to control the actual lights from the one switch, define the Group as:
Group:Color gLights
Put gLights on your sitemap as the Switch and ColorPicker and Slider and any command sent to gLights will also be sent to all the members of gLights. No Rule required.
Also adding “end” to the rule nothing has changed.
Why the rule has no sense?
Please can you help me in the simplest way?
I’m feeling really stupid not understanding my mistakes
Just put gLights on your sitemap as you would the lights. Anything you do to gLights on your sitemap will be sent to all members of gLights automatically. You don’t need a Rule.
The Rule doesn’t make sense because:
you send a command to gLights
OH forwards the command to all of its members
the rule triggers
the rule tries to update the state of all the members of gLights but doesn’t need to because they have already received the command