2023.8: Update breaks automations

Sure thing:

alias: Laundry Light - ON/OFF
description: >-
  Turn on laundry light when door open.  Verbal warning when left open too
  long.  Turn off when door closed, left open too long, or security is armed.
trigger:
  - platform: state
    entity_id:
      - binary_sensor.laundry_door_sensor_6_window_door_is_open
  - platform: device
    type: turned_on
    device_id: 552fa1d64a5d6b65451ed26dc97dd686
    entity_id: switch.laundry_double_switch_2_2
    domain: switch
    for:
      hours: 0
      minutes: 20
      seconds: 0
  - platform: state
    entity_id:
      - sensor.edgar_keypad
    to: true
    attribute: exit_delay
condition: []
action:
  - choose:
      - conditions:
          - condition: device
            type: is_on
            device_id: 552fa1d64a5d6b65451ed26dc97dd686
            entity_id: switch.laundry_double_switch_2_2
            domain: switch
            for:
              hours: 0
              minutes: 20
              seconds: 0
        sequence:
          - service: hassio.addon_stdin
            data:
              addon: 3ebf62bd_notifier
              input:
                volume: "{{states('sensor.announcement_volume')}}"
                music: Alert.mp3
          - service: hassio.addon_stdin
            data:
              addon: 3ebf62bd_notifier
              input:
                volume: "{{states('sensor.announcement_volume')}}"
                music: LaundryLight.mp3
          - delay:
              hours: 0
              minutes: 0
              seconds: 3
              milliseconds: 0
  - choose:
      - conditions:
          - type: is_open
            condition: device
            device_id: 282ba212047b97afcff5dd6b30d40d76
            entity_id: binary_sensor.laundry_door_sensor_6_window_door_is_open
            domain: binary_sensor
          - condition: device
            type: is_off
            device_id: 552fa1d64a5d6b65451ed26dc97dd686
            entity_id: switch.laundry_double_switch_2_2
            domain: switch
        sequence:
          - type: turn_on
            device_id: 552fa1d64a5d6b65451ed26dc97dd686
            entity_id: switch.laundry_double_switch_2_2
            domain: switch
      - conditions:
          - condition: device
            type: is_on
            device_id: 552fa1d64a5d6b65451ed26dc97dd686
            entity_id: switch.laundry_double_switch_2_2
            domain: switch
        sequence:
          - type: turn_off
            device_id: 552fa1d64a5d6b65451ed26dc97dd686
            entity_id: switch.laundry_double_switch_2_2
            domain: switch
mode: single

Instead of commenting on the automation’s flaws, I offer you a simple and functional alternative.

- alias: Upstairs Servercorner Motion starts Lamp
  trigger:
    - platform: state
      entity_id: binary_sensor.motion_servercorner
      from: 'off'
      to: 'on'
    - platform: state
      entity_id: binary_sensor.motion_servercorner
      from: 'on'
      to: 'off'
      for:
        minutes: 5
  condition: []
  action:
    - service: 'switch.turn_{{ trigger.to_state.state }}'
      target:
        entity_id: switch.plug_desk
  mode: single
1 Like

Correction, the automation in the first posting still gets stuck. :cry: Again, suspecting the automation.trigger bit even though it seems to work fine in some automations. Any devs here who might know whether anything has changed in the handling of the automation.trigger functionality?

I also had similar issues and restored a backup from before the update.

1 Like

@EndUser, did you restore it into 2023.8? Or did you restore the entire Home Assistant server to a previous state?

I’m not sure that’s necessarily the problem though. The sample of mine I posted I have around 15 identical copies for different rooms all with identical Z-Wave devices - of them only this one has begun exhibiting the “jam” since 2023.7.3

1 Like

I did a full restore to before 2023.8

1 Like

@EndUser, just to clarify. So, you did not use the built-in restore functionality but rather rolled-back your VM or your SD card)? Which version is your system now?

I DID use the built-in restore functionality

1 Like

I just tried the full restore to yesterday’s pre-2023.8 backup. It has just started now (phew), however, the underlying version is still 2023.8.

Settings-About:

Home Assistant 2023.8.0
Supervisor 2023.07.1
Operating System 10.4
Frontend 20230802.0 - latest

The problems persist! The automations still get stuck. :cry:

P.S. Just noticed there is another backup of the core. Trying that now.

My restore was successful:

Home Assistant 2023.7.3
Supervisor 2023.07.1
Operating System 10.3
Frontend 20230705.1 - latest

1 Like

Wow, that core restore seemed to take forever. But on first site, the trickiest of automations seems to be working again. I’ll check the others in a moment.

Home Assistant 2023.7.3
Supervisor 2023.07.1
Operating System 10.4
Frontend 20230705.1 - latest

However, I cannot really mark this as a solution, since @Tillsy seems to be in trouble with the old version as well.

If the problem is in 2023.8 others must be experiencing this, too. Strange, why it’s so quiet.

BTW, I had originally thought a “full backup” would include everything. Turns out not so much.

@EndUser, kudos to you! Your idea seems to have saved me for now! Thanks a million!

1 Like

Thank you, @123. However, your solution will only work for this specific situation (it is actually close to what I had when I started two years ago). With the other automations, it’s a whole load of different triggers and conditions.

Anyway, it seems the problem lies deeper somewhere hidden in 2023.8.0.

You posted just one “specific situation” and that’s what my example is meant to resolve.

Do they also use the technique of triggering themselves with automation.trigger?

Post an example of “a whole load of different triggers and conditions”.

1 Like

Thanks for your speedy reply. Yes, the automations failing with 2023.8 also include automation.trigger triggering itself. However, many automations using the same automation.trigger triggering itself scenario worked just fine.

Anyway, since the problems disappeared after changing back to 2023.7.3 (as far as I can tell, all automations are working just fine), the problem might be deeper than the automations themselves.

Could somebody with a Github account point the devs to this thread, maybe? I am not on Github myself.

If you suspect it’s a software bug in version 2023.8.0, report it as an Issue in Home Assistant’s GitHub Core repository. That’s where the development team tracks bugs. You will need to create a GitHub account (it’s free) to do that.


FWIW, the use of automation.trigger isn’t a best practice in general, let alone using it an automation to call itself. More often than not, the automation’s design is improved if it avoids using automation.trigger.

2 Likes

For me a restore can take up to 30 minutes

1 Like

After the latest backup (before 2023.8) I had added 2 Zigbee devices. To my surprise these showed up after the restore.

1 Like

They are stored on the nvram on the stick, and rediscovered. The backup/restore does nothing with the stick.

2 Likes

Makes sense. Thanks.

1 Like