My issue is that I have a single automation which does not load on startup.
Here is the automation:
alias: Turn on hall light on movement
trigger:
- platform: state
entity_id: binary_sensor.pir_hall
to: "on"
condition:
- condition: state
entity_id: sun.sun
state: "below_horizon"
action:
- service: switch.turn_on
entity_id: switch.hall_light
“configuration > general > reload automations” does not fix
removing the condition does not fix.
All the other automations load ok
Example working automation:
alias: Turn off hall light
trigger:
platform: state
entity_id: binary_sensor.pir_hall
to: "off"
for:
minutes: 1
action:
- service: switch.turn_off
entity_id: switch.hall_light
Firstly it does not seem to matter if the is there or not (I have this working now without the -; I guess the - is only needed if there is more than one block in the trigger)
The problem was this:
At some point in the development I had the line initial_state: 'false'
This disables the automation on restart; unfortunately removing this line does not change this ‘disabled’ state.
To fix I went to the ‘states’ tab, clicked on ‘more info’ and in the dialog that appears there is a switch which allowed me to re-enable the automation