home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.92k stars 30.14k forks source link

ZHA remote_button_short_press on aqara trigger twice the automation since 2024.8.0 #124146

Closed rexave closed 1 month ago

rexave commented 1 month ago

The problem

Since 2024.8.0, remote_button_short_press event on an lumi.sensor_switch.aq2 trigger twice the automation. It does this with 3 differents buttons. I can see in the log panel of the device the Attribute Updated event was fired twice at the same time. So it seems it happens in zha.

What version of Home Assistant Core has the issue?

core-2024.8.1

What was the last working version of Home Assistant Core?

core-2024.7.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

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

Diagnostics information

zha-f89e15102ecfa788480f864c75382191-LUMI lumi.sensor_switch.aq2-13651f44e4198324d05d1e182670c234.json image

Example YAML snippet

Automation :

alias: Atelier-Volet-toggle
description: par bouton
trigger:
  - device_id: 13651f44e4198324d05d1e182670c234
    domain: zha
    platform: device
    type: remote_button_short_press
    subtype: remote_button_short_press
action:
any


### Anything in the logs that might be useful for us?

_No response_

### Additional information

_No response_
home-assistant[bot] commented 1 month ago

Hey there @dmulcahey, @adminiuga, @puddly, @thejulianjes, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `zha` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign zha` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


zha documentation zha source (message by IssueLinks)

dmulcahey commented 1 month ago

Enable debug mode for ZHA, reproduce the issue, disable debug mode and attach the downloaded log.

rexave commented 1 month ago

please find the debug log attached it seems the system understands an "on" command (line 92), then an "off" command (line 96). It's a single push button (not a bistable button) home-assistant_zha_2024-08-18T13-13-30.436Z.log

rexave commented 1 month ago

FYI 2024.8.2 still have the issue

dmulcahey commented 1 month ago

please attach the entire automation

dmulcahey commented 1 month ago

https://github.com/user-attachments/assets/5d3f169a-1852-4e12-9f08-56c2f900b3bb

Just set up a test with it. It appears to be working as it should. Take a look at your automation to make sure it isn’t doing something odd.

rexave commented 1 month ago

I just tryed with a new button and did reproduce :(

home-assistant_zha_2024-08-18T14-00-45.064Z.log

with this automation

alias: test aqara
description: ""
trigger:
  - device_id: 798a02fe679be3601eab093cab97cff9
    domain: zha
    platform: device
    type: remote_button_short_press
    subtype: remote_button_short_press
condition: []
action:
  - action: system_log.write
    metadata: {}
    data:
      level: error
      message: hello
mode: single
rexave commented 1 month ago

can you check your execution history ? on the new automation, you can see it's trigger twice : image

dmulcahey commented 1 month ago

can you check your execution history ? on the new automation, you can see it's trigger twice : image

ok I changed the mode to queued on the test I set up and I can reproduce the behavior. Let me see what is up...

rexave commented 1 month ago

I'm glad you could reproduce :) Please let me know if i can be of any help !

rexave commented 1 month ago

FYI issue is still present in 2024.8.3

rexave commented 3 weeks ago

issue fixed in 2024.9.0 thanks !