Hi all,
I have mounted some roller shutters which are integrated in HA via the elero addon (GitHub - W00D00/home-assistant-elero: Elero Centero component) which is working perfectly. Now I am trying to make a new automation where the rollershutter (cover.buerobalkontuer) should open if the door to the balcony (binary_sensor.burobalkontur) gets opened and the roller shutter was closed. This is working fine.
alias: Rollladen im Wohnzimmer öffnen wenn Balkontüre geöffnet wird
description: ''
trigger:
- platform: state
entity_id: binary_sensor.wohnzimmerbalkontur
from: 'off'
to: 'on'
condition: []
action:
- service: cover.open_cover
target:
entity_id: cover.wohnzimmerbalkontuer
mode: single
In the next step I tried to automatically close the roller shutter when the door gets closed again. Here I am facing some issues… In order to ‘remember’ if the roller shutter was opened by the automation I introduced a bool (input_boolean.buerorollladen_was_closed).
alias: 'Rollladen im Büro öffnen wenn Balkontüre geöffnet wird '
description: ''
trigger:
- platform: state
entity_id: binary_sensor.burobalkontur
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: cover.buerobalkontuer
state: closed
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.burobalkontur
state: 'on'
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.buerorollladen_was_closed
default: []
- choose:
- conditions:
- condition: state
entity_id: input_boolean.buerorollladen_was_closed
state: 'off'
sequence:
- service: cover.close_cover
target:
entity_id: cover.buerobalkontuer
default: []
- choose:
- conditions:
- condition: state
entity_id: input_boolean.buerorollladen_was_closed
state: 'on'
sequence:
- service: cover.open_cover
target:
entity_id: cover.buerobalkontuer
- service: input_boolean.turn_off
target:
entity_id: input_boolean.buerorollladen_was_closed
default: []
mode: single
At the moment the following is happening:
1.) the roller shutter is open and the door closed → input_boolean.buerorollladen_was_closed=off
2.) roller shutter and door are open → input_boolean.buerorollladen_was_closed=off + rollershutter moves to closed position
3.) roller shutter and door closed → input_boolean.buerorollladen_was_closed=off + roller shutter stays closed
4.)roller shutter is closed + door open → input_boolean.buerorollladen_was_closed=on + roller shutter stays closed
5.) roller shutter and door closed–> input_boolean.buerorollladen_was_closed=off + roller shutter moves to open position
6.) everything repeats from point 2 again.
Where is my error in the automation?
Thanks in advance!
BR