Automations become Unavailable / Are Turned Off/On?

I also face the same problem and this disable the automation to kick in which is sad. Do we know how we can avoid this ?

2 Likes

I have the same problem and it is causing big issues for me as it’s a heater for a kids room.

1 Like

Also having this problem recently I think… any solutions or ideas to troubleshoot?

1 Like

I think I found a clue. I noticed that in the logs I was getting a warning the same time as the automation becoming unavailable. The warning was related to a duplicate statement in my configuration file. I’ve removed the statement and I’ll be observing what happens next.

1 Like

Has someone found the solution yet? I am also having the same problem.

1 Like

im having the same problem also. they seem to toggle on and off by themselves.

image

1 Like

Also having the same problem, has anyone been able to get a clue in what’s happening?

2 Likes

I have same problems, anyone has ideas?
Thank so much!

Hi Guys,

I also have same issue here, but in my case is even worst because the issue impacts my lights (I have sonoff tx wall switch) when I turn on the lights a few minutes later the lights change the status (on logbook to ‘became unaviable’) and then the turn off all the lights on the house… any ideias?

I have noticed the same thing today with completely unrelated automations.

I to have the same problem. Automations with a wait loop get cancelled because of this issue!

I’m getting this too. What power supply are you guys using? My Rpi3 officially needs a 2.5a charger and I’m just using an old iPhone 5v2A charger. My RPi Power Status Integration displays ‘Problem’ and I wonder whether this has anything to do with it. Will buy a 5v3A capable QC charger later today and update you guys.

(personally, this hasn’t really caused any issues for me because I’ve implemented a 2second delay in all my triggers, and these phantom turning on/off problems only last fractions of a second)

update: okay, so after getting a better power adapter & cable, my RPI Status is now OK, but the ‘became unavailable’ still continues occasionally, so it’s not a power / under voltage issue. Perhaps it’s a network thing? mine is wired ethernet.

Came to the forums today to research and post this issue. Yes I am using an automation, but the issue also presents if on the device page I toggle to turn on. If I toggle or trigger the device to turn on it turns of instantly. The device in question is a ZEN30, I’m trying to look through the logs to see when it stopped functioning. It’s been working fine for a year or more.

Anybody has ideas on how to debug or what information to provide for debugging?

Same problem here.
An automation became unavailable in the middle of actions execution so did not complete.

Having a similar issue here. First time user trying to set up a light=on based on calendar event triggers. My Meeting Start automation keeps flipping to unavailable every time I update it, which I do every time it fails and I try to test again. However, my Meeting End automation that toggles the light OFF has had 0 issues.
image

Correction: My Meeting End automation is doing the same. Very Frustrating.

EDIT: Turns out the 15 minute refresh interval was the main source of my confusion. You may see the calendar refreshed in the UI, but the entity state is stuck on that interval. I don’t know that the “Became unavailable” log is really any harm.

Are people still seeing this issue? I have automations that run actions X minutes after sunset and they are constantly being cancelled. When I look at the logs I see all automations became unavailable and then turned on again but that’s enough to cancel automations in progress.

First post in this community, but I tink I have found the reason.

I have the same thing. Multiple log entries with turned ON and unavailable.

It appears that every time you save ANY automation setup, they all go unavailable and instantly turnes ON again.

Very easy to replicate. Go into any automation. Even a disabled one. Change a name or something, and hit save. Go back to log, and you will see an entry on automations going unavailable and turning ON within the same second.

Edit: It’s supposed to work this way. Whenever you save an automation, the automation YAML file needs to be run again.

1 Like

First of all thanks for this hint. now I at least dont need to debug by my self for half day to figure out this :slight_smile:
Does anyone “more experienced” know any way how and if the re-load can be prevented ? I mean, I definitely understand that if I adjust automation A ,then the automation A needs to be reloaded / restarted.
However to reload (therefore restart) all the automation is for my case inconvenient - long story short from time to time i need to disable one automation + i have always running automation for my heater to turn on in the night, if some condition was fulfilled in the evening before.
If there is not a way now to prevent complete reload, is there a possibility to vote for a feature request? :slight_smile: (yes I understand that somebody needs to design / code it in their free time basically, but maybe if we get enough attention…who knows :slight_smile: )

PS: I know there have been lately some updates into automation - does anyone know if i can “manually” tell to automation that it is already in, for example , step 3 of 5? so it continues only with the steps 4,5 and does not need to first wait for 1,2 and 3 to be true.

Thanks for answers anybody

Not possible. The only way automations get updated without an HA restart is by calling the automation.reload service (bottom of the page). That’s what actually happens if you save an automation to make your changes take effect, it calls that service. Same if you click “automations” in this page.

This is why if you search the forum there are many, many, many posts where the “more experienced” users tell people why they need to avoid long delay steps, wait steps or for times in triggers/conditions. If you save any automation in the UI all currently running automations will be simply stopped and any waiting in any of those steps will be killed without completing.

The only thing you can do is vote for this post (or this one, or this one, or this one, …)

One of those posts on the WTH for this is mine. I should mention that I personally try to avoid any (long) delays in my automations (once I realized how HA handled automations). I think it’s good practice to be more resilient, but also that HA shouldn’t reload all automations the way it does now.