itavero/homebridge-z2m

[Bug] Stateless Programmable Button Event Mapping

m1nimt opened this issue · 3 comments

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have a hue dimmer switch. it supports single click and hold. when i click it it sends out two messages:

on_press

on_press_release

same thing when i hold except it sends out an on_press first:

on_press

on_hold

on_hold_release

so because of the of the event mapping of this plugin, when i hold the button, homekit thinks im pressing the button AND holding it. (i.e single press turns light on, hold opens blinds. when i hold to open only my blinds it will also register a single click turning the lights on too)

Related devices

Phillips Hue Dimmer Switch V2

Related Devices

No response

Steps To Reproduce

No response

Expected behavior

I would like for it to respond to any .._.._release as it would prevent dual inputs

Device entry

No response

Status update

Info 2023-02-18 16:03:16MQTT publish: topic 'zigbee2mqtt/Hue Dimmer Switch', payload '{"action":"on_press","battery":86,"linkquality":116,"update":{"installed_version":33565954,"latest_version":33565954,"state":"idle"},"update_available":false}'

Info 2023-02-18 16:03:16MQTT publish: topic 'zigbee2mqtt/Hue Dimmer Switch', payload '{"action":"on_hold","action_duration":0.794,"battery":86,"linkquality":116,"update":{"installed_version":33565954,"latest_version":33565954,"state":"idle"},"update_available":false}'


Info 2023-02-18 16:03:17MQTT publish: topic 'zigbee2mqtt/Hue Dimmer Switch', payload '{"action":"on_hold_release","battery":86,"linkquality":108,"update":{"installed_version":33565954,"latest_version":33565954,"state":"idle"},"update_available":false}'

Messages from this plugin

No response

This plugin

1.9.2

Homebridge

v1.6.0

Zigbee2MQTT

1.30.1 commit: eb878d3

Homebridge Config UI X (if applicable)

v4.50.2

This is the device you are referring to, right?

https://www.zigbee2mqtt.io/devices/929002398602.html

Too bad that there isn't an action value with this suffix for each "group" of action (the "recall scene" ones do not have it).

I guess the logic needed should be something like: if there is a "released" version for all values within a group, then use those variants instead.
If I have time, I'll try to see if this can be easily added and which devices would be affected by this change.

yeah thats the right device

thanks a lot!

stale commented

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!