#Since update to 2011.1, ZHA-related automations (switches) not working

1 messages · Page 1 of 1 (latest)

flint osprey
#

Hey all,

Having a weird issue here with Zigbee switches. I have a couple of IKEA and Philips Hue (all connected through ZHA, not their own hub) switches that seem unresponsive.
After checking the logs, it seems that the events are being picked up by ZHA, and the automations are being triggered, but the lights don't respond. When I turn on the lights through the Home Assistant UI, they work fine.

This is with several different blueprints. Notably, the Philips Hue dimmer blueprint brodock/HueDimmer_RWL022.yaml and the Ikea blueprint brent/zha-ikea-tradfri-wireless-dimmer-with-options-for-custom-actions.yaml, but others have the same issue.

I should note that I do see "No action executed" in the trace, but this automation hasn't been changed in ages and only stopped working after the upgrade to 2024.11.1

Any thoughts would be appreciated! 😄

I'll add the YAML in a reply.

#
mode: restart
triggers:
  - platform: event
    event_type: zha_event
    event_data:
      device_id: 6d8abc8e1003f0d735e554c3502bda50
actions:
  - variables:
      command: '{{ trigger.event.data.command }}'
      cluster_id: '{{ trigger.event.data.cluster_id }}'
      endpoint_id: '{{ trigger.event.data.endpoint_id }}'
      args: '{{ trigger.event.data.args }}'
      on_short_custom: true
      off_short_custom: true
      on_long_custom: false
      off_long_custom: false
      lights:
        entity_id: none
  - choose:
      - conditions:
          - '{{ command == ''on'' }}'
          - '{{ cluster_id == 6 }}'
          - '{{ endpoint_id == 1 }}'
        sequence:
          - choose:
              - conditions: '{{ on_short_custom }}'
                sequence:
                  - type: turn_on
                    device_id: b441e142ad0ce05962ad9a695b82e72b
                    entity_id: 90b7a66bf936f8b21665763bdba41f4a
                    domain: switch
              - conditions: '{{ not on_short_custom }}'
                sequence:
                  - target:
                      entity_id: none
                    data:
                      transition: 1
                    action: light.turn_on
      - conditions:
          - '{{ command == ''off'' }}'
          - '{{ cluster_id == 6 }}'
          - '{{ endpoint_id == 1 }}'
        sequence:
          - choose:
              - conditions: '{{ off_short_custom }}'
                sequence:
                  - type: turn_off
                    device_id: b441e142ad0ce05962ad9a695b82e72b
                    entity_id: 90b7a66bf936f8b21665763bdba41f4a
                    domain: switch
              - conditions: '{{ not off_short_custom }}'
                sequence:
                  - target:
                      entity_id: none
                    data:
                      transition: 1
                    action: light.turn_off
      - conditions:
          - '{{ command == ''move_with_on_off'' }}'
          - '{{ cluster_id == 8 }}'
          - '{{ endpoint_id == 1 }}'
        sequence:
          - choose:
              - conditions: '{{ on_long_custom }}'
                sequence: []
              - conditions: '{{ not on_long_custom }}'
                sequence:
                  repeat:
                    while:
                      - condition: template
                        value_template: '{{ repeat.index < 10 }}'
                    sequence:
                      - target:
                          entity_id: none
                        data:
                          transition: 1
                          brightness_step_pct: 10
                        action: light.turn_on
                      - delay: 1
      - conditions:
          - '{{ command == ''move'' }}'
          - '{{ cluster_id == 8 }}'
          - '{{ endpoint_id == 1 }}'
        sequence:
          - choose:
              - conditions: '{{ off_long_custom }}'
                sequence: []
              - conditions: '{{ not off_long_custom }}'
                sequence:
                  repeat:
                    while:
                      - condition: template
                        value_template: '{{ repeat.index < 10 }}'
                    sequence:
                      - target:
                          entity_id: none
                        data:
                          transition: 1
                          brightness_step_pct: -10
                        action: light.turn_on
                      - delay: 1
id: '1702612626312'
alias: ZHA - TRADFRI - Toggle desk outside wall (GuestBR)
description: ''
#

And the trace timeline

deft sequoia
#

Can you check which commands are sent in the ZHA event when you press the button? Because it looks like the 'choose' action doesn't find any of the conditions met. So maybe there were firmware updates that changed the exact payload of the events?

#

The command received should be visible in trigger variable, which you can find in the 'changed variables' in the first step of the automation trace.

#

FWIW I have both Philips Hue dimmers and Tradfri buttons on ZHA in 2024.11 and they still work with their automations so I'm sure this can be resolved.

flint osprey
#

Found the issue. Apparently when you rename entities, and HA asks you to "rename all" it doesn't actually rename everything. The automations, etc. are still trying to use the old names. So I'll be going through my automations to change them in the yaml.

So that makes sense that it doesn't find the conditions. Thanks! 😄