Automations disappeared AND scenes no longer editable

Over the past few weeks I’d edit an automation (web based) and go back to view them and that one wouldn’t be visible. I’d go to either an iOS or Mac HA app and voila, that automation would be there.

BUT – yesterday I updated and when it rebooted ALL of my automations disappeared (in the GUI, but where in automations.yaml) – AND all of my scenes were now flagged as not being editable (“only scenes in scenes.yaml are editable”). I then restored to the backup and… same…

So, reading prior posts I copied automations.yaml to automations.old and then deleted 'em all; and same for scenes. WEIRD – but those same scenes still now show up as not editable even though the scenes.yaml is now empty (yes, I did reboot).

So, I created ONE new automation (using an entity name) and it’s in the yaml file, but still NO automations appear.

HELP!

here’s the automations.yaml (via creating one thru the GUI):

- id: '1730591384992'
  alias: sunset, couch
  description: ''
  triggers:
  - trigger: sun
    event: sunset
    offset: -00:22:00
  conditions: []
  actions:
  - action: light.turn_on
    metadata: {}
    data:
      brightness_pct: 86
      kelvin: 4133
    target:
      entity_id: light.smart_rgbtw_bulb_light
  mode: single

Did you modify your main configuration.yaml file at all?

And have you checked the log for errors? Chances are there’s something in those files causing errors.

1 Like

Yes, edited configuration.yaml
I was trying to get color loop working for Halloween.

I’ve just moved it to configuration.old and reloaded all yaml but didn’t reboot (yet)… no difference

It was:


recorder:
  exclude:
    entities:
      # Exclude any logging of the light.
      - light.smart_rgbtw_bulb_light
      # Exclude any logging of the color loop script for this light.
      - script.my_color_loop
      - automation.my_color_loop
    event_types:
      # Don't record ANY service calls
      - call_service
      - plex
      - homeassistant.components.plex
  commit_interval: 20

Yep, I didn’t see any errors in the logs (related to yaml, that is)

Rebooted, still no automations showing & all scenes showing not editable.

Only log warnings (no errors, other than ipv6):


2024-11-03 01:28:09.270 WARNING (MainThread) [zigpy.application] Zigbee channel 25 utilization is 92.96%!
2024-11-03 01:27:24.197 WARNING (SyncWorker_0) [supervisor.host.sound] Can't update PulseAudio data: Failed to connect to pulseaudio server

Still no automations showing!
So, any ideas of what else to try please…

This makes Home Assistant useless except being a Matter bridge to HomeKit, and HomeKit is sooooo limited!

Try restoring automations.yaml and configuration.yaml from a older backup?

Re: restore

I did a partial restore (before clearing out automations.yaml) & that made no difference. And even cleaning out automations & scenes didn’t help. But I’m willing to try restoring those two… but I don’t see why that would work if cleaning them out didn’t.

Other than doing a complete restore, how would I restore just those two files?

Try downloading the backup and unzip it.

Hi FearlessLeader,

Where’s
default_config:
?
That or something to tell your set-up to enable automations: is helpful…

Thanks, but… ???

(1) When I first edited configuration.yaml to try color_loop, it was empty… and yet everything had been running fine for the few weeks I had set up HA. Automations & scenes were aok. I have no idea what happened to make everything suddenly stop working.

(2) I had manually added the integrations that seemed useful to me for a first HA setup… to control lightbulbs. Not sure why all of those that would be added by default_config: would (a) suddenly make it work again & (b) are even needed for me.

If you removed stuff a couple of weeks ago, and didn’t restart, the stuff would still be there. When you restart all the default stuff that you didn’t think you were using went away and it all broke. That would be my guess.

If you don’t have the default, and you don’t have automations:, then you won’t have automations, for instance…
Add the default_config back in and see what happens.

Huh? I didn’t remove stuff at all. I was trying to use the color_loop blueprint which suggested adding some stuff to configuration.yaml to exclude the light from having gobs of log entries, so I went to edit configuration.yaml and found that there was nothing in there.

So, are you suggesting that I add “default_config:” to configuration.yaml even though it was never there??? Reading about it, it seems to load quite a few integrations that I’ll have no use for.

Shouldn’t “automations” be a native part of HA to begin with so that “default_config:” wouldn’t even be necessary? I’m even more confuse now.

Don’t be confused. Stop reading my stuff if it confusing you. Read this… (I linked it above, but I will link it again here…

Your stuff is not confusing. I previously DID read the page about default_config: and there was nothing that I read about “automations” wouldn’t run without using “default_config:”.

But sure, I’ll add it to the configuration and see if that makes automations suddenly appear.

Ok. added it and rebooted. Looking at “Integration startup time” and “Default Config” is there as is " My Home Assistant" (which that page you linked to says is part of that default config) is there too…

Automations were empty before I rebooted.
I created one simple automation (at a specific time, toggle a light).
File editor shows that simple automation is in automations.yaml.

BUT

Settings/automations – shows NO automations (and that simple toggle a light that shows up in devices/entitites did NOT toggle).

So… next idea please.

At some point you removed key lines from configuration.yaml. The default contents are:

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

I have no idea how those lines were removed, truly!

BUT

Woo Hoo! Solved!

1 Like