Zigbee2mqtt doesn't support all Hue Dimmer v2 states?

Hi all,

After reading about ZHA and zigbee2mqtt I decided to go with zigbee2mqtt. However, I’ve just noticed, on setting up my first dimmer, that I’m not getting the states that I hoped for in terms of multiple presses e.g.

up_double_press
up_triple_press
up_quadruple_press
up_quintuple_press

To detect these “presses” do I need to move to ZHA?

While we’re on the subject, would I be better switching to ZHA? Did I make the wrong choice?

Neither will give you those states if the device itself doesn’t provide it.
Have a look at the various Hue Dimmer blueprints emulating those in automations.

Here is a blueprint for ZHA that can do it.

Not 100% sure, but it looks to me like ZHA exposes these press types. If not (and the logic is in the blueprint) then it could be converted to Z2M.

edit: I use Z2M and prefer it overall to ZHA.

Many thanks!
That’s what I must have seen from a previous search.
How would I go about starting to convert this to Z2M?

If this is the device you are talking about, converting the blueprint to Z2m won’t help you.

If you read through the Action (enum) section, you’ll see that the states you are looking for are not currently reported in Z2M

That’s not RWL022

Then use the link I sent you to find out which device you have and share it with us, please.

PS - I had already searched for RWL022 there and came up with nothing. If your device looks like that, then it’s probably the same device. Only way of being 100% certain is to open your device page in Z2M.

The one you’ve linked to is V1 of the Dimmer. I’ve actually got V2 dimmers which don’t seem to be listed (they have “hue” on the “off” switch).

You mean these?

Yes, they are the ones! I thought I went through all the Philips switches but clearly not.
Does that mean it will be possible to add the missing actions?

Possible, probably.

Easy, probably not. It all depends on how far you’re willing to experiment with your knowledge of how Z2M works. It’s scary at first, but extremely rewarding once you manage.

You’ll essentially end up having to create a custom definition, but at this stage it’s easier to start with the following 2 things:

  1. Check if the device itself actually generates and sends the action to Z2M by following this part in the link above (no need to create a definition or the external_converters line at this point - just set Z2M logging to debug):

  2. Have a look through the Z2M Github issues for similar requests. I found one for you here, which ended up being Closed due to inactivity because whoever raised it didn’t provide any tangible info like the logs from step 1 above.

The below is what I’m getting after enabling debugging, after a double-click with the “on” button.

It seems that there’s no sign of a double-click action in the logs, other than registering literally 2 presses.

info 2024-10-15 21:41:58z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Dimmer Study', payload '{"action":"on_press","battery":100,"linkquality":145,"update":{"installed_version":33565954,"latest_version":33565954,"state":"idle"},"update_available":null}'
info 2024-10-15 21:41:58z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Dimmer Study', payload '{"action":"","battery":100,"linkquality":145,"update":{"installed_version":33565954,"latest_version":33565954,"state":"idle"},"update_available":null}'
info 2024-10-15 21:41:58z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Dimmer Study/action', payload 'on_press'
info 2024-10-15 21:41:58z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Dimmer Study', payload '{"action":"on_press_release","battery":100,"linkquality":145,"update":{"installed_version":33565954,"latest_version":33565954,"state":"idle"},"update_available":null}'
info 2024-10-15 21:41:58z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Dimmer Study', payload '{"action":"","battery":100,"linkquality":145,"update":{"installed_version":33565954,"latest_version":33565954,"state":"idle"},"update_available":null}'
info 2024-10-15 21:41:58z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Dimmer Study/action', payload 'on_press_release'
info 2024-10-15 21:41:58z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Dimmer Study', payload '{"action":"on_press","battery":100,"linkquality":145,"update":{"installed_version":33565954,"latest_version":33565954,"state":"idle"},"update_available":null}'
info 2024-10-15 21:41:58z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Dimmer Study', payload '{"action":"","battery":100,"linkquality":145,"update":{"installed_version":33565954,"latest_version":33565954,"state":"idle"},"update_available":null}'
info 2024-10-15 21:41:58z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Dimmer Study/action', payload 'on_press'
info 2024-10-15 21:41:58z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Dimmer Study', payload '{"action":"on_press_release","battery":100,"linkquality":145,"update":{"installed_version":33565954,"latest_version":33565954,"state":"idle"},"update_available":null}'
info 2024-10-15 21:41:58z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Dimmer Study', payload '{"action":"","battery":100,"linkquality":145,"update":{"installed_version":33565954,"latest_version":33565954,"state":"idle"},"update_available":null}'
info 2024-10-15 21:41:58z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Dimmer Study/action', payload 'on_press_release'

Thanks for the GitHub link - that’s exactly what I’m trying to achieve too.

1 Like