I am new to ZHA and trying to learn the system. I am a dev myself but there are so many options I am not sure where to do what…
I am lost with when to use the UI, Scripts, Templating to just do one simple task.
When I click on the button it should open the curtain, if its already open it should close it.
I have one aqara button and one curtain. Both are added (zigbee2mqtt).
I just made a simple automation and want to change the position variable based on the “open or closed” state of cover.0x04cf8cdf3c7555ca.
If toggle doesn’t work you will need to “choose” action (see choose action based on the current position. So you would setup the choose use a condition that checks if position=0 and then executes open, otherwise executes close. I’m afraid I can’t help you with the exact syntax, but you can probably work that out by using the GUI for making an automation and setting it up there and then copying it from the YAML.