Automations won't start on Home Assistant Restart

it says the usual - Config will not prevent Home Assistant from starting

Rename automations.yaml to automations.old
create an empty automations.yaml

restart HA

does that work ?

1 Like

that worked - at least automations are showing up now on the visual editor. I guess one of those automations was breaking things up then?

Yes, now the work is finding which one.

1 Like

Yeah. Paste the back from the old file a few at a time until you find the issue.

1 Like

This is the solution. I troubleshooted it and learned the hard way not to delete devices abruptly - a single device deletion called this mayhem. Also for anyone reading this afterwards - MINIMIZE the use of DEVICE in triggers - do states instead. That will simplify troubleshooting vs. looking at random IDs and having to read entire automation

1 Like

Ok. While I strongly agree with your stance on device automations, you may have just found a bug.

In a recent release the behaviour of device automations was changed. Rather than disappearing completely a device automation that used an unavailable device should now report as unavailable. It seems that instead it is creating the mess of issues you reported above.

We should open an issue about this. Can you post the automation that caused the issue (if you still have your automations.old file)?

Also what version of home assistant are you on?

Edit:
For my reference this is the PR: Set automations which fail validation unavailable by emontnemery · Pull Request #94856 · home-assistant/core · GitHub

Others with this issue:

Hello all

This happened to me again out of the blue after a complete rebuild and updates

After a complete destruction of the HA vm on proxmox I re-install HA OS and all the addons and integration i had before.

I restarted HAOS af ter each addition

As I’m adding z-wave devices and i started to add simple automation this situation happed for the 3rd time.

I tried to rename automation .yaml to old this was more a disaster than before because it goes way beyond my comfort zone.

I deleted and destroyed the HA VM again and recreated it.

After each step I created a backup (just in case)

As i added addons and integrations nothing happened.

I added z-wave js ui addon and the js integration as per instructions and so far all is fine.

I truly believe that the root cause of this were all the updates from HA and the integrations that were not aligned.

I will continue to add integrations and automations and continued to create full backups and see where this goes

The cause is that you are using device automations, and the way missing devices in automations are handled has changed, possibly including a bug.

If you keep adding back the same faulty automation without changing it you will get the same result.

You did not answer any of my questions so I can’t help you.

@tom_l
Same thing happened to me.
What would be the info needed to debug it?

I’ve updated from 2023.8.1 to 2023.8.2 and also use device automation. However I certainly did not delete any of them that are used in automations.

You would need to remove all the automations from your automations.yaml file, reload or restart the add them back one at a time reloading in-between to find the automation at fault.

1 Like

Okay, I’ve dug through the logs, found the ID it was erroring on, found it in the automations.yaml and changed the triggers and conditions from device based to state based (glad I’ve already had them in other automations and could just copy them)

Thank you, nevertheless!

1 Like

I think it was this one (I did retain Automations.old). Device that caused it is the one in “Condition”

- id: '1691345676498'
  alias: Princess Window R Open/Close
  description: ''
  trigger:
  - platform: time
    at: '21:00:00'
  condition:
  - type: is_open
    condition: device
    device_id: a84a65093ec671a93f09e00a34769ce9
    entity_id: 702f5fe57949392deaaef8d89966e2f4
    domain: binary_sensor
  action:
  - type: turn_on
    device_id: 287d6dfad0dc0c36c5b8fd09238e5742
    entity_id: light.king_bulb_ceiling
    domain: light
    brightness_pct: 90
    alias: Turn on King Bulb
  - service: notify.alexa_media_sphere
    data:
      data:
        type: tts
      message: Princess right window is open
  mode: single

Version - wise:
Home Assistant 2023.8.2
Supervisor 2023.08.1
Operating System 10.4
Frontend 20230802.0 - latest

this is actually very simple (I am not technical at all myself) - all you do is go into File Editor → rename Automations to .old and then click + to create file automations.yaml. That’s it. You then restart and all starts working. Then just copy across from automations.old little by little to identify the culprit and quash it.

Are any of the devices used in that automation unavailable?

Yes, the one in Condition was

3 posts were split to a new topic: Automation lux condition issue

Perfect.

I have opened an issue for you here:

Please follow along and answer any of the developers questions that you can.

1 Like

thanks, hopefully helped community a bit beyond just paying for Nabu Casa :slight_smile:

7 posts were split to a new topic: Odd condition issues after update to 2023.8.2