How to configure the Philips Hue wall module to use push button (momentary) type wall switches [ZHA]

Same problem, only accepts 0 and 1.

File "/usr/src/homeassistant/homeassistant/components/zha/websocket_api.py", line 1333, in set_zigbee_cluster_attributes
    response = await zha_device.write_zigbee_attribute(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/zha/zigbee/device.py", line 878, in write_zigbee_attribute
    value = convert_zcl_value(value, attr_def.type)
  File "/usr/local/lib/python3.13/site-packages/zha/application/helpers.py", line 156, in convert_zcl_value
    field_type[value.replace(" ", "_").split(".", 1)[-1]]
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/enum.py", line 782, in __getitem__
    return cls._member_map_[name]
           ~~~~~~~~~~~~~~~~^^^^^^
KeyError: '2'

Same goes for me; I’m having this problem with a wall module which until recently worked fine with 2 momentary switches. It suddenly switched to rocker mode and ever since, I can only set it to 1 button rocker or 1 button momentary switch (modes 0 and 1), all other modes just raise an error when trying to set them.

I see that there were some changes recently (History for zhaquirks/philips/wall_switch.py - zigpy/zha-device-handlers · GitHub), but can’t really tell what version my Home Assistant instance is currently using. I’m using Hass.io and have no idea how to find the quirk files.

I managed to find the quirk files and replace the wall_switch.py file with latest one from GitHub (zha-device-handlers/zhaquirks/philips/wall_switch.py at d2895d591cb3d9e884de5f990741c5a2cd05f0ab · zigpy/zha-device-handlers · GitHub). This fixed the issue, although the values have changed to SingleRocker, SinglePush, DoubleRocker and DoublePush instead of the previous 0, 1, 2 and 3 modes. So setting the value for mode to DoublePush fixed it for me.

I assume this fix will be in the next release, but if anyone needs to fix this asap because of non-functioning switches like me, this is what I did (but do so at your own risk!)

  • Install Advanced SSH & Web Terminal and turn off Protection Mode
  • Open Terminal and enter the Docker container: docker exec -it homeassistant /bin/bash
  • Change the working directory to /usr/local/lib/python3.13/site-packages/zhaquirks/philips: cd /usr/local/lib/python3.13/site-packages/zhaquirks/philips
  • (Optional) Make a backup of the current quirk file: cp wall_switch.py wall_switch.py.bck
  • Download the new quirk file and overwrite the old one: curl -4 https://raw.githubusercontent.com/zigpy/zha-device-handlers/d2895d591cb3d9e884de5f990741c5a2cd05f0ab/zhaquirks/philips/wall_switch.py > wall_switch.py (I had to force IPv4 in order for this to work using -4, this may be different for you)
  • Restart Home Assistant Core
  • Retry setting the mode using the new values mentioned above
  • Turn on Protection Mode for Advanced SSH & Web Terminal and optionally remove it if you don’t plan on using it in the future

As far as I’m aware, the homeassistant Docker container can be recreated at any time, which means the change will be undone, but I don’t think this will cause any issues with wall modules that have already been configured.

As I said before, do this at your own risk; I don’t know much about the Home Assistant internals, just enough to be dangerous!

Just a little input that could help some of you:


On my RDM001, I had today actually human readable values in the mode. Also see the Cluster is not the same as mentioned in the post. I tested to write “SwitchMode.SinglePush”, “SwitchMode.SingleRocker”, “SwitchMode.DoublePush” and “SwitchMode.DoubleRocker” and all work and seem to have the desired behaviour from the log, thus, as you see, I use it as a Single Rocker and just read the release event to toggle my light.

I still hope it can help someone because I had absolutely no useful hit in google with these attributes I was reading from the cluster mode attribute.

Hi nannyy,

thx a lot for the fresh info. I have many RDM001 switch modules and I don’t get this new cluster. Do you use a quirk file?
I try to change the mode to doublepush, but I don’t get it.

My Home Assistant Version:

  • Core2025.1.4
  • Supervisor2024.12.3
  • Operating System14.2
  • Frontend20250109.2

Ohhhh this is very cool!