Hey guys,
I’m having trouble getting my script to run which is triggered by an Automation. The script opens my shutters when I open my front door during a specific time frame only if my shutters are down (binary_sensor.rolluik).
I have a binary_sensor.away_mode which switches to ON after leaving the house for 30 minutes. Once the front door is openen this sensor switches to off. When entering the living room within 20 seconds the rfkey3 binary sensor activates the automation below.
The logbook shows the script is turned on by the automation, but my shutters do not open.
This is the automation which triggers the script:
- id: '1600928819940'
alias: Rolluik UP bij binnenkomst na away mode
description: ''
trigger:
- platform: state
entity_id: binary_sensor.rf_bridge_key_3
to: 'on'
condition:
- condition: template
value_template: '{{ is_state(''binary_sensor.away_mode'', ''off'') and (now() - states.binary_sensor.away_mode.last_changed).total_seconds()
< 20 }}'
- condition: state
entity_id: binary_sensor.rolluik
state: 'off'
- condition: time
after: '06:00'
before: '19:00'
action:
- service: script.turn_on
data: {}
entity_id: script.rolluik_driekwart
mode: single
The script simply opens the covers and disables the away mode automation.
The logbook shows that everything is activated but the shutters remain closed.
If I manually activate the automation within 20 seconds of arriving home, it works…
Any idea’s guy?
Thanks!