Automations turning Off after Restart

At times (not very often but still annoying), after a HA restart, I have noticed that almost all of my automations shutoff. I say “almost”. Out of the 30+ automations, 1 or 2 will remain on. The log file gives me no clues. I turn them all on again via the web UI and I am good to go again. I may not see the problem again even after several restarts then… bam. Off again

Anyone else have this happen?

1 Like

Do you have initial_state: false in your automations?

No I do not. Below is one of (many) my automation that will turn off on its own

  alias: 'Theme Dark Cyan'
  trigger:
    platform: numeric_state
    entity_id: sensor.office_rh
    above: '44'
    below: '51'
 
  action:
    service: frontend.set_theme
    data:
      name: darkcyan

What version of HASS?

Current: 0.85.1

There was a breaking change introduced in 0.84.x when automations were added to the storage system. Call the service automations.turn_on with no parameters to turn all of your automations back on.

Then in the future as you toggle automations off/on their state will be saved on restarts of HA.

1 Like

That will work if you turn on all automations, but I would suggest adding initial_state: true to the config of each automation. That way, if you have an automation that you want to remain off at startup, that will work.

No need, toggle the ones you want off/on and the state will be saved on future restarts.

I’ve had this happen periodically after a restart since at least 0.5x. All automations will turn off.

Would be nice if there was a way to simply turn them all back on.

I disagree with this as I’ve experienced issues with the automations not following their previous state on restarts. What the issue is, I don’t know. However it does exist. To add I don’t believe you will be able to make blank service calls very soon in the future.

Not sure if it’s a bug, but I’ve had automations turn off after restart that I never even touched. I did some research, and there were quite a few others that had the same problem.

You should bug report if it’s still occurring.

Unfortunately, when it was happening to me, I couldn’t reproduce it regularly, and I just hardcoded them to be on at startup so it doesn’t happen again.