Disappearing automations

I have a weird issue lately, and I would need some pointers.
I am running :
Home Assistant 2023.4.6
Supervisor 2023.04.1
Operating System 9.4

Lately, I started to observe that new automations I am creating via editor are initially all good, but in a short interval they disappear from front end, because of becoming unavailable (see it in states)

What is odd, is that they also disappear from automations.yaml file

Please give me an idea what to look after.


I’m guessing you are using either device triggers, conditions or actions. This is one of the problems with using this simple method. Automations are only visible if all the devices they depend upon are available.

It’s a big problem that you can avoid by not using device triggers, conditions or actions. There are always other triggers conditions and actions you can use instead.

e.g. instead of a device turn on trigger use a state trigger. See:


For the actions, refer to the documentation for the integration you want to control. e.g. for a light the available services are listed here:

Also if you only ever use entity_ids in your triggers, conditions and actions (and never use device_ids) then when you have to replace a device you can change the new entity id to match the old one in one place and all your automations keep working.

If you use device ids you have to change all of them. Everywhere they are used.

Also device actions, triggers and conditions do not support more advanced features like templating.

Device automations were meant to simplify creating automations for beginners. In practice however they have proven to do the exact opposite. The problems with them confuse many new users. Best to avoid device based automations altogether.

If you want help converting one of your device automations to an entity id based one post the yaml here (correctly formatted for the forum) and we can point you in the right direction.

1 Like

@tom_l thanks for pointing. What you are saying makes sense but I don’t think I was using device_id in any of mine - at least not in those automation.

What is kind of odd is that some automations which are shwing unvavailable in FE, are completely missing from the automations.yaml file. Simply no longer in there.
I typically create automaitons in the Automations editor and seldom manually touch the YAML file with other editor.