2023.8: Update breaks automations

If that is the case, then I’d recommend that others do the same until the cure is found and implemented… My HA is running smoothly in the meantime.

It’s not a panacea.

Example

When motion is detected, an automation turns on a light. After a few minutes it turns off the light. If the automation gets ‘stuck’ after attempting to either turn on or turn off the light, it will no longer respond to detected motion. The automation will remain that way (inoperative) until Home Assistant is restarted (at 04:00).

Increasing the frequency of restarts isn’t a blanket solution either because it can interfere with functional automations that might employ actions such as delay, wait_template, wait_for_trigger, repeat, etc or triggers that use the for option.

Restarting also has the effect of setting the value of an entity’s last_changed property to the time of the restart as opposed to the time when the entity’s state changed for “nominal” reasons. This can impact datetime calculations that employ the last_changed property.

1 Like

It is not… Neither is aspirin a remedy for migrains, but it helps sometimes.

I don’t dispute anything that you write and you are obviously more knowledgeable than I am. BUT so far it has worked for me and it could help others… until there is a solution.

You’re free to offer whatever advice you want.

Everyone else is free to explain why it may be bad advice.

You are obviously the smartest :roll_eyes:

I don’t see it that way. For me it’s about sharing all the details, positive and negative, so users can make informed decisions.

Let me respond in a nice way. I do not pretend to be an experienced HA user and I am not.
ALL I have posted is MY experience and why it has worked for ME. If you, or anyone, has a better solution than we would all benefit from that.
I fully understand that my “solution” may not be perfect and that it may have “side-effects” and I appreciate someone explaining those possible “side-effects”.
Some people in this forum use nice language and others have a know-it-all attitude. I guess that I may have limited patience with the latter.
I will have nothing else to add to this rather pointless conversation, but will look forward to a better solution to the issue.

Seeing that you touched on the topic of ‘nice language’, don’t overlook the fact that my focus was exclusively on analyzing your technical advice, not commenting on you as an individual. You didn’t return that courtesy when you made it personal with this obviously sarcastic reply:

Nor the allusion made here:

There have been several workarounds mentioned in this topic, all have pros and cons, none seem to work for all circumstances or for all users. Knowing a workarounds’s pitfalls allows people to understand the consequences of implementing it.

Restarting Home Assistant serves to reset all automations (and everything else). It will obviously clear any ‘stuck’ automations but it will also do all the other things mentioned above. Whether those things will impact a given user depends entirely on what their automations are designed to do. It’s a YMMV situation.

3 Likes

@raman325 Messaged you on Discord with some debug data. I can gather more where needed.

1 Like

Hi everyone. New to Home Assistant myself. We have had Home Assistant installed recently on a VM running on a QNAP NAS. We started off with 2023.7, and migrated about 80 Z-wave devices over from a Smartthings installation. I am not super technical, and for all intents and purposes, I am a newbie to HA.

I daresay it seems like I chose the wrong time to migrate to HA. I had a major Z-wave issue with devices dying and requiring me to restart HA a few times a day - as in the entire VM. I was seeing a lot of dead devices on Z-wave JS UI, and restarting that add-on, or HA itself wasn’t actually helping. I had to do a full re-boot and even eject the Aeotec Z-stick 7 from the NAS (from the NAS software as well as physically) and re-insert it before the Z-wave JS UI add-on could re-connect to my devices again. By this point, I was already experiencing a few automation not working, hanging for me and in “Still Running” state, but my experience was very limited and could barely trace what was happening, and with my entire Z-wave network dying every few hours, a had a scapegoat in that.

In any case, I found a thread on GitHub with some other users experiencing similar problems and upgraded Z-wave JS UI to the latest version, 1.15.7, and just like that, I hardly experienced a dead device again (even though this device dying thing and needing a ping is relatively new for me, something I did not experience on my previous 2 systems - personally I think it should not be happening at all as these devices are not really dead though some may be a bit slow to respond).

Elated, I then decided to upgrade Home Assistant itself, and we are now on 2023.8. But then my focus shifted to the automation. I have automation with both Single and Restart mode getting stuck. I have read all of the above, with great interest, and I am extremely grateful to all of the contributors above.

The HA restart solution will not work for me. I have a hot water circulation automation that is super important and it is triggered a several hundred times a day by some event or other. That tends to get stuck more often than others, likely a few hours after a restart. Sure, a restart helps, but in my case I cannot use it because there is no telling how soon the next automation freeze is going to happen.

I tried the continue_on_error: true “bandaid fix”. In my case, my YAML does not like the following:

But rather like this:

      - type: turn_on
        continue_on_error: true
        device_id: 229cee14998402e61077da66045dd526
        entity_id: 75ac70af59e960e3869f96982771fe9f
        domain: switch
    enabled: true

I am not sure why my “turn on” and “turn off” code is different than yours, but I built mine from the UI, not directly in YAML (which I am not familiar with yet). In any case, I inserted the continue_on_error “label” or command there, and it has improved things. My automations can now go for several hours instead of a few hours. But… ultimately, at some point or other, they still fail.

Anyhow, that’s my experience. My greatest pain is that I have no 2023.6 backup to revert to, and thinking back, I feel quite certain I already had problems with HA on 2023.7 - they were just masked by the bigger problem I had with my controller getting completely jammed. So there is nothing for me to fall back on at this point - or so I think.

A few questions I have:

  1. Is it at all possible to somehow move back to 2023.6 without having a backup, or would I need a fresh install of everything, all add-ons, all automations, etc.?

  2. Is there anyway I can have the system alert me if there is more than one instance running of an automation set to Restart mode? I mean - if I get these alerts, at least I can restart HA as soon as it happens. No, of course, not ideal as it will screw automations with delays etc., but at least, I know.

  3. Since I am one to HA and have no experience of this sort of thing… How long does it normally take for such serious issues to be fixed with a new release? Just looking for some idea on when to expect a light at the end of the tunnel…

Anyhow, any feedback would be appreciated.

  1. I don’t think there were (significant) DB schema changes since then, so it should be fine. Check the changelogs/release notes.

  2. Yes, check the current attribute of an automation. There are posts here about that. YMMV.

  3. As stated several times already, the underlying integrations need to be fixed. The HA changes merely exposed the existing issues.

1 Like

Because you picked ‘Device’ from the menu instead of ‘State’ and produced a Device Trigger instead of a State Trigger.

3 Likes

Thanks, yes - I see what you mean as I have used ‘State’ in some cases, but Device seemed easier for me to use, perhaps because I am not familiar with HA yet.

In any case, as I said in my earlier post, the continue_on_error: true seems to have worked for the moist part, by not always.

Meanwhile I implemented a “double bandaid” solution… Took out all turn_on and turn_off commands out of the more troublesome automation and replaced them with a toggle-type helper, then created one automation for all helpers in order to ensure that when a helper is toggled, its corresponding physical device is also toggled (kept in sync). The original automation remains with mode Restart or Single as initially intended. But the new automation that keeps devices in sync with their helpers is in mode Parallel and I gave it a ridiculous amount of 10,000 runs… I still used the continue_on_error: true after every turn_on and turn_off. Yes, it might be that runs never finish, but it will not affect the original automation as those are only concerned with the helpers. And then I set Home Assistant to restart daily at a time at night when I know I have nothing scheduled and when it could least disrupt anything (or probably anything at all) - this should get rid of any residual running instances of the new automation that remain running at the end of the 24 hour period.

is it pretty? No, absolutely. Possibly not best practice either, but I needed to do something to keep the system ticking along nicely until the developers fix this flaw.

Thank you. I’ll think about downgrading… not sure I will risk it, especially since I have a bit of a workaround for the time being, but I’ll consider it.

Thanks for your answer about 2, I’ll try to give it my best shot. And about point 3, understood. I just joined HA at the wrong time, or I’d be back on 2023.6 in no time at all and I wouldn’t mind if it took months. But nevertheless, I’ll work with a few workarounds (unless I downgrade).

OK so here’s an update for Z-Wave - we have what we think is a fix that will go into beta on Wednesday. Would appreciate any help testing the fix as I am not running into the problem myself.

If you’d like to learn more details about the problem we think we found, see here: Automations marked as "Still Running" After Upgrade to 2023.7 & 2023.8 · Issue #98073 · home-assistant/core · GitHub

2 Likes

Hi, same issue here. Haven’t debugged it that much. I did read the beginning of the topic but did not have time to read it through, sorry.

For me the automations don’t work with very simple light on/off controls (hue remote controlling hue ceiling light). These have worked solidly at least for a year now and about at the time of upgrading to 2023.8 everything started to break.

My solution is to change trigger mode-> save automation and the change it back and save again, everything works smoothly until restart of HA and then the problem comes back.

Don’t know if this helps to find the problem or if it is already pointed in the discussion. But it would be very nice to get the automations working again. :slight_smile:

To add: i run ZHA on skyconnect and all the motion based automations have worked before and are still working. I only have problems with remote (button) triggered light automations.

I also am having this issue, very simply time based controls have stopped working in 2023.8. The automation seems to stop working, then never start working again.

Please let me know if you still experience issues with zwave after updating to 2023.9 which has a potential fix (but looking for confirmation!)

1 Like

I am sorry to report that the problem still persists after updating today.

Let me add that I do not use zwave at all (as I mentioned before). My devices are connected through DeCONZ and Mosquitto.

I am rolling back to core 2023.7.3 now.