I have a scene which changes the color of my bathroom lights
scene.bathroom_relax
If the Arcadian Light switch is on, I cannot change the color using my scene – obviously. Now I created an automation, which checks if my scene is turned on and turns the switch off. But it is not working and I don’t know what I am doing wrong. Please help me.
Here is my code. I found this trigger part on this forum.
I forgot to mention, that I am using the deCONZ-component for my lights. I created scenes using the Phoscon-Web-UI. So the scene.bathroom_relax shows up in HA, but I don’t have a config file for it.
Ah ok, that complicates things. Well the thing with scenes is (at least in my case) that the state is always set to “scening”. This means that you can’t set a trigger to it as the state never changes. I don’t know if this is true for your particular scene, but with HA scenes (the standard ones) this is not possible as far as I know. I could be terribly wrong though.
What you could do is the following. Create 2 groups (1 group with all the devices in your scene that should be ‘on’ and 1 group for all devices that should be ‘off’) you can then set conditions in your automations that when both those groups meet the requirement that it will trigger an automation. I have been experimenting with this so I could have Homekit like scening and it works pretty well.
You will need to create input booleans as well if you want the states to be shown.