Welcome to Incremental Social! Learn more about this project here!
Check out lemmyverse to find more communities to join from here!

Disabled automations continually become enabled

I've had a problem for a year or more, so that's through numerous Home Assistant updates: I have about 15 automations that I've disabled, but they always become enabled again within a few days. I haven't been able to determine a trigger for the re-enabling.

Has anyone else encountered this? Does anyone have a suggestion?

brainstorm ,

There should be entries in the history/logbook for the automation entity itself (automation.whatever). From there you should at least be able to determine, what changed the enabled state of your automation(s). If it is a service, you might have to search for specific calls of this service (e.g. in your other automations). It might also be an option to do a global text search for the entity IDs of your automations and/or any automation services. You could do this via the vscode addon if it is installed.

I myself have never encountered this error and got a few disabled automations, which haven't changed their state over months and multiple updates/restarts.

mike_wooskey OP ,
@mike_wooskey@lemmy.d.thewooskeys.com avatar

Thanks for the assitance, @brainstorm.

One of my automations that was disabled but is now enabled has turned off triggered by service Automation: Turn off about a week ago in the Logbook. What does "turned off" mean for an automation?

And in History it looks like this:
https://lemmy.d.thewooskeys.com/pictrs/image/502fe250-9b39-478f-b403-0bca81ec5d35.png

What part of this information is usable to search for what triggered the automation to be re-enabled?

CondorWonder ,

Turned off or Turned on is the disable or enable action. If it’s changed by something in HA it should show what the trigger was too (like a user or other automation).

https://lemmy.ca/pictrs/image/768d29f7-3dca-4bfe-bf6b-27fabce95297.jpeg

Here’s an example - it shows the automations that enabled our disabled this automation, and their trigger.

To prevent the automation from being changed you can rename it, that should break anything automatic that’s changing it. You can also try to chase down what’s changing it from logs (once renamed you should start seeing errors in your HA log file), or by searching for the entity_id in your yaml configuration files.

mike_wooskey OP ,
@mike_wooskey@lemmy.d.thewooskeys.com avatar

Thanks for the explanation and example, @CondorWonder.

I used Studio Code Server to search all files for "Automation: Turn Off" and "automation.turn_off" and "automation" - there were 100s (1000s?) of results. I scanned through them and didn't see anything that looks like it was enabling these automations. And that's the only record in my logbook around these automations being disabled.

So now I've renamed some of my automations and re-disabled them. In a few days they'll either become enabled or I'll search my logs for errors including their previous names.

CondorWonder ,

Try searching for your automation.entity_id - like in my case it’s something like automation.notify_washer_done (the original entity id of my automation, found via the developer - states tab). Then if I search using that in my YAML I’d see entity_id: automation.notify_washer_done, and add the context to see the full service call:

service: automation.turn_on
target:
  entity_id: automation.notify_washer_done
data: {}

Assuming it’s an automation or script your should find it in the related .yaml file and can scroll up to see the actual automation or script source.

mike_wooskey OP ,
@mike_wooskey@lemmy.d.thewooskeys.com avatar

This is really confusing to me. The History list shows when this automation was turned on and turned off (turned on means enabled, turned off means disabled) but the Logbook list doesn't show anything for this automation at the datetime it was enabled (it does show me manually disabling the automation, though).

I searched for the automation's name (e.g., automation.my_automation) in every file in HA's confg directory and there are no occurrences. I also searched for the automation's ID (e.g., 1623421375007) in every file in HA's confg directory the only occurrence is in the Automations.yaml file where the automation is defined. I also searched for automation.turn_on and automation.turn_off in every file in HA's confg directory and there are no occurrences.

This seems strange: when I click on the "On" or "Off" bar in the History list for this automation and the details for the automation pop-up (screenshots below), and I then click "Related", the section that says "Part of the following automations" lists about half of my automations, but none of them have anything to do with this automation.

https://lemmy.d.thewooskeys.com/pictrs/image/cb63e462-b8a8-4261-97ce-26cb1e1eebd2.png

https://lemmy.d.thewooskeys.com/pictrs/image/e6596dc8-0a07-4fff-9831-eb568feb3ff2.png

mike_wooskey OP ,
@mike_wooskey@lemmy.d.thewooskeys.com avatar

I forgot to mention that I had also renamed one of my automations in the hope that I'd be able to find the original name in my log files when whatever was trying to turn it off could no longer turn it off. But I can't find anything in the log files containing the original name.

brainstorm ,

You could also search for the automation.turn_off service in your yaml files and see, if any match references your specific automations entity_id.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • homeassistant@lemmy.world
  • incremental_games
  • meta
  • All magazines