Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HASS Event Different to Z2M Event #25200

Closed
D3v01dZA opened this issue Dec 14, 2024 · 6 comments
Closed

HASS Event Different to Z2M Event #25200

D3v01dZA opened this issue Dec 14, 2024 · 6 comments
Labels
problem Something isn't working

Comments

@D3v01dZA
Copy link

D3v01dZA commented Dec 14, 2024

What happened?

Using the experimental support in #24233.

I have a four button scene switch https://www.zigbee2mqtt.io/devices/TS0044.html#tuya-ts0044.

The actions for each button in Z2M are (where <button> is a button no like 1_single):

  • <button>_single
  • <button>_double
  • <button>_hold

These all show up correctly in Z2M however in HASS the events for hold specifically do not contain the button number, only the text "hold".

So when clicking button 1 once the event in both is "1_single", when double clicking it its "1_double", but when holding it its "1_hold" in Z2M but "hold" in HASS when means I can't disambiguate which button was actually held.

What did you expect to happen?

When holding a button I expect to know which button was held in the event.

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.42.0 commit: 861cba6

Adapter firmware version

7.4.2 [GA]

Adapter

TubesZB MGM21

Setup

x86-64 Docker

Debug log

No response

@D3v01dZA D3v01dZA added the problem Something isn't working label Dec 14, 2024
@mundschenk-at
Copy link
Contributor

mundschenk-at commented Dec 15, 2024

Have a look at the other attributes (besides event_type). Not all possible action values are parsed in the current experimental implementation, the fallback is to just put everything in event_type.

@D3v01dZA
Copy link
Author

D3v01dZA commented Dec 15, 2024

Ah I see the button in the attributes, now I can continue. Still it seems like this shouldn't be different based on the event type...

event_types:
  - 1_single
  - 1_double
  - hold
  - 2_single
  - 2_double
  - 3_single
  - 3_double
  - 4_single
  - 4_double
event_type: hold
icon: mdi:gesture-double-tap
friendly_name: Test Quadmote Action
button: "2"

For example this is what happens for single clicks :(

event_types:
  - 1_single
  - 1_double
  - hold
  - 2_single
  - 2_double
  - 3_single
  - 3_double
  - 4_single
  - 4_double
event_type: 1_single
icon: mdi:gesture-double-tap
friendly_name: Test Quadmote Action

@mundschenk-at
Copy link
Contributor

Well, you have just discovered why it is labelled "experimental".

@D3v01dZA
Copy link
Author

Yes - hopefully this will be seen as feedback on a new feature

@mundschenk-at
Copy link
Contributor

Sorry if it wasn't clear from my earlier statement: Obviously the parsing logic should (and eventually will) be expanded to cover all actions. There's just a lot of ground to cover and we are currently discussing how this will be done.

@D3v01dZA
Copy link
Author

Nice! Let me close this one out then as this is obviously being looked at :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants