I’m trying to come up with more advanced automation rule to control my blinds.
I have button for up/down direction connected to unipi board and two switches to control blinds.
Basically what I’m trying to achieve is rule like this:
when contact of unipiDigitalInput-5 is opened then (when unipiRelay-7 is on then turn unipiRelay-7 off else unipiRelay-7 on
Then I would have another rule saying (to automaticaly power off blinds):
when unipiRelay-7 is on for 20seconds then turn unipiRelay-7 off
Main idea is, that you press the button, and blinds will go down. If you press button again, blinds will stop. If relay is on more then 20seconds turn it off.
Can you please advise me how to make rule like this?