I am a newbee to HA and is trying to setup Automations.
I have an IKEA switches that I use for turning on/off a lampe.
I have seperate automation for turning on the lamp and one for turning off the lamp.
But, can’t this be combined in one Automation?
(via conditions for example?).
Below is example of what I am trying to do.
But, I cant setup the conditions to execute action dependant in which button pressed, ON or OFF.
There might be a way…
Can someone point me in the right direction?
Please go to developer console>events and then listen to zha_events. Then press the button to turn on and off. You should see seing event logs there, Please share it. We will need that to make this automation.
Thanks, great tip.!
Maybe I should inform that I am using a conbee (deconz)…
I started to listen to deconz_event… but did not get any input right away when activating the Switch.
After 2 restarts of the server, input began to show up.
Here is what I got for a short press:
From this event you can combine the automation. The key part of the log is event which for this log is 1002 meaning single hold release. This varies with each type of button action and can be seen below.
You can use the vent type trigger can be the same but actions should be template in nature. Please check out below yaml.