Automation turns off

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
  - entity_id: light.loo_light
    for: '600'
    platform: state
    to: 'on'
  condition: []
    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?

Take a look in the automation docs.

1 Like

Boom! That’s where I saw it… the initial state thing. I don’t know why I couldn’t find it second time round .

Thank you!

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.

I don’t think I have anything else. I only have 3 automations and this was happening before I added the other 2.

You should check the Info page, as well as home-assistant.log, to see if there are any clues as to why the automation is turning off.