I have a physical switch (Operating via Zigbee) and several Philips Hue Lights controlled by Scenes. I would like to use the switch as a toggle to switch between 2 scenes.
The scenes are working fine but I cant see how to get the Automation, when the switch is pressed, to say:
I want to switch the scene every time I press the switch. In other words, all scenes one after the other.
The trick is to query the attribute value “rgb_color” and then activate the scene depending on it. I have created three automations for this purpose:
If scene Hal is currently set, then activate scene Vapor.
If Scene Vapor is set, activate Scene Magneto.
If scene Magneto is set, activate scene Hal.
In this way, one automation always reacts to the keystroke and switches on the next scene.
Since I have a different RGB value on lamp 1 for each scene, it was sufficient for me to only take this value into account.
Exactly and thank you very much for that. This answer inspired me.
The last step for me was to find out which scene is active for the lamp based on the RGB values and to switch accordingly.