Hi guys,
I’m new with Hassio and I’m facing some problems to understand why automations not always trigger.
Just looked all over this forum but found no explanation so I hope someone can clarify this.
It’s a simple automation triggered by the state of an Binary_sensor, but not always runs.
- alias: 'abre_portao_garagem'
initial_state: false
trigger:
- platform: state
entity_id: binary_sensor.hikvision_events_line_crossing_1
from: 'off'
to: 'on'
condition:
- condition: sun
after: sunset
action:
- service: switch.turn_on
entity_id: switch.portao_garagem
mode: single
From the Developer Tools we can see that the Binary_sensor as been tripped today, but the automation didn’t ran.
Yesterday worked correctly and it’s this behaviour that I don’t understand.
The formatting/indentation is wrong, so it’s hard to tell what’s going on. Can you please repost after hitting the </> in the edit box to retain formatting?
Thanks for the reply.
The initial_state it’s to enable the automation the startup of the system?
I thought it was to trigger it at the startup. Now I understand.