I have a homeatic ip cover button for my kitchen cover.
I would like my kitchen cover to
(1) set a position to 50, when I press the “down” button (in the app or the switch on the wall).
(2) When the cover is at position 50 and I press the button once again, I would like it to go to position 0 (closing).
I tried to automate (1) in a first step. However, my automization is not triggered, when I press the down button. Here is my code:
Well… It looks as if the entity triggering the automation is the same as the entity in the action section - so when it starts to perform one action, you want it to do something different. Not sure that’s even possible.
Shouldn’t the trigger be something else? The button press? The action could then be…
If… position is 50… close completely
Else… close to 50
In the trigger, almost always the state or numeric state of an entity, then call a service in the action section.
trigger:
- platform: state
entity_id:
- switch.bedroom_socket_1
to: "on"
condition: []
action:
- service: light.turn_on
data: {}
target:
entity_id: light.bedroom