core: Automation with MQTT actions 'Stopped because of unknown reason "null" '

The problem

As suggested by @allenporter in https://github.com/home-assistant/core/issues/97721 I create this new issue.

Not sure if it is the same issue as in https://github.com/home-assistant/core/issues/97721 … I experience an issue with an automation (blueprint) activating a scene after. The scene is not executed properly (light does not turn off in this case). Sometimes it works, sometimes it does not work. The scene turns off some lights in the living room and 2 in the dining room. The issues are with the 2 on the dining rooml Sometimes only one of the two lights turn off. Sometimes, both stay on, Sometimes both turn off…

Button: Zigbee (Hue Tap) Lights: Philips Hue lights Both operate via Zigbee2MQTT.

Worked flawlessly the last 2 years.

Also works OK when triggered via dev tools, directly via scene configuration page or when ‘run’ the action within the automation configuration page.

It feels like the scene execution is stopped too early.

Screenshot 2023-08-19 at 08 45 06

Automation/blueprint

mode: restart
max_exceeded: silent
trigger:
  - platform: state
    entity_id: sensor.hue_tap_keuken_action
action:
  - variables:
      command: '{{ trigger.to_state.state }}'
  - choose:
      - conditions:
          - '{{ command == ''press_1'' }}'
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.beneden_uit
            metadata: {}
      - conditions:
          - '{{ command == ''press_2'' }}'
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.backup_hue_lampen_beneden_tap_2
            metadata: {}
      - conditions:
          - '{{ command == ''press_3'' }}'
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.backup_keukentafel_tap_3
            metadata: {}
      - conditions:
          - '{{ command == ''press_4'' }}'
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.backup_keukentafel_tap_4
            metadata: {}
id: '1658572961723'
alias: Woonkamer / Keuken - Hue Tap
description: ''

Trace trace automation.woonkamer_keuken_hue_tap 2023-08-18T20_25_31.437655+00_00.txt

Scene entities First one (woonkamer) works OK, 2nd and 3rd ones (Eettafel) give the issues. Screenshot 2023-08-19 at 09 03 15

HA version: 2023.8.2

Additional info I thought, adding a 1s delay after the scene activation might be a workaround. But it didn’t work Screenshot 2023-08-19 at 09 20 11

When I directly turn off the lights within the automation. It works OK (it turns off all the lights), but the red ‘null’ error still occurs

service: light.turn_off
data: {}
target:
  entity_id:
    - light.eettafel_links
    - light.eettafel_rechts
    - light.woonkamer

What version of Home Assistant Core has the issue?

2023.8.2

What was the last working version of Home Assistant Core?

I guess before the 2023.8 releas

What type of installation are you running?

Home Assistant Container

Integration causing the issue

MQTT

Link to integration documentation on our website

https://www.home-assistant.io/integrations/mqtt/

Diagnostics information

config_entry-mqtt-015cc97c23625204817cd8654f3b7d7c.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 24 (16 by maintainers)

Most upvoted comments

Is the scene turning on also disabling the current automation?

@joostlek No

@allenporter Turned debug on for homeassistant.helpers.script. Nothing appeared in the log.

Ok I may have the wrong package. Maybe it ends up under homeassistant.components.automation. Will look more tomorrow…