I’ve got an automation that turns a light off 10 minutes after the light state goes to on:
- id: '1547191832307'
alias: Loo Light Off After 10 minutes
trigger:
- entity_id: light.loo_light
for: '600'
platform: state
to: 'on'
condition: []
action:
service: light.turn_off
entity_id: light.loo_light
It works but then on the Overview page, the toggle switch goes to off so I have to switch it back on again. I thought I saw something on automation about a default state for the automation but I can’t find it any more. Could this be what’s causing my problem?
But, still, the automation shouldn’t be turning itself off. There certainly isn’t anything in that automation that should cause it to turn off after it runs. Do you have something else that is turning it off? If so, setting initial state won’t fix that problem.