Skip to content

Conversation

@Ra72xx
Copy link
Contributor

@Ra72xx Ra72xx commented Oct 22, 2025

Blueprint Checklist

  • You viewed the README and conformed to the naming conventions
  • You ordered the actions as stated in the README action order
  • All filenames are lowercase and uses '-' for spaces and not '_' while using {service-name}-{switch-name-or-type}.yaml format
  • Images are png
  • Image backgrounds are transparent and is cropped to the device boundaries
  • Images has a maximum width of 800px and maximum height of 500px
  • There are no missing buttons or actions
  • Your integration/service is running on the latest version
  • You have tested your blueprints and made sure each button and action works

Zigbee2MQTT

  • (older devices) You have ensured legacy is off/false for the device in the Z2M devices Settings (specific) page and that your actions matches those with legacy off?

This pull request adds the missing multi-click actions for the single and double rocker variant of those Aqara switches.

  • I implemented all actions according to the Z2M docs (https://www.zigbee2mqtt.io/devices/WS-K07E.html, https://www.zigbee2mqtt.io/devices/WS-K08E.html). However, my switches only emit single presses for the upper row and single and double presses for the lower row. Hold and release are not available at all. I decided to stick to the docs and add all functions nevertheless.
  • I only own the double rocker variant which seems to have slightly different action names, so the single rocker variant is not tested.
  • Existing configurations do no longer work until the have been "fix"ed in the user interface. This is because the current implementation was incomplete.

Add support for double press, hold, and release actions for both upper and lower row buttons.
These actions are available according to Z2M device docs (https://www.zigbee2mqtt.io/devices/WS-K08E.html#aqara-ws-k08e), however for me the upper row only accepts single clicks, the lower row clicks and double clicks.
As I don't know if this is an error in the docs or a not-yet-finished implementation in Z2M, I included these actions.
Enhance Aqara H2 EU switch blueprint actions
Added additional button actions for double press and hold/release events.
@Hoff-SoloWan
Copy link

Hello @Ra72xx ,

already thanks for working on this change! Might it be possible to include the dimmer switch?
https://www.zigbee2mqtt.io/devices/KD-R01D.html

Cheers, Michael

@Ra72xx
Copy link
Contributor Author

Ra72xx commented Nov 14, 2025

Hello @Ra72xx ,

already thanks for working on this change! Might it be possible to include the dimmer switch? https://www.zigbee2mqtt.io/devices/KD-R01D.html

Cheers, Michael

If I have some time... I don't really know how to adapt this "rotation"-stuff in the logic of SwitchManager.

@Hoff-SoloWan
Copy link

Hoff-SoloWan commented Nov 14, 2025

Actually i'm using this dimmer only in control_relay mode to integrate non-smart lights into my smarthome. if i'd have smart-bulbs i think i wouldn't use this kind of dimmers at all (due to limited functionality).

long story short: actions like click, double, press/hold and release are the most important features imo. rotation-stuff is more lika a nice to have thingy for far more-advanced, precise and edgy scenarios (e.g. control audio volume, remote thermostat-dial, etc)

@Ra72xx
Copy link
Contributor Author

Ra72xx commented Nov 14, 2025

Actually i'm using this dimmer only in control_relay mode to integrate non-smart lights into my smarthome. if i'd have smart-bulbs i think i wouldn't use this kind of dimmers at all (due to limited functionality).

long story short: actions like click, double, press/hold and release are the most important features imo. rotation-stuff is more lika a nice to have thingy for far more-advanced, precise and edgy scenarios (e.g. control audio volume, remote thermostat-dial, etc)

That might be relatively simple. Could you try if the appended files (unzip in $HOMEASSISTANT_DIR/blueprints/switch_manager) work for you?
zigbee2mqtt-aqara-h2-eu-rotary-dimmer.zip
I looked at the example for H1 variant available in ZHA. That one also includes some smart stuff with the different rotation directions, which I don't know how to handle (and do not need either).

@Sian-Lee-SA
Copy link
Owner

Wont there be an issue in not knowing the direction for rotating actions?

@Ra72xx
Copy link
Contributor Author

Ra72xx commented Nov 17, 2025

Wont there be an issue in not knowing the direction for rotating actions?

I don't really know, that was just a quick hack'ed together blueprint. I saw the rotary direction stuff in some other blueprints but did not really have the incentive to look into it ;-).
Sorry for the deleted png in the pull request, that was a mistake I did in my branch and as I use git only once a year I did not know how to get rid of that wrong upload before the pull request.

@Ra72xx Ra72xx changed the title Expose more functions for Zigbee2MQTT Aqara H2 switches (WS-K07E and WS-K08E) Expose more functions for Zigbee2MQTT Aqara H2 switches (WS-K07E and WS-K08E) and basic functionality for H2 rotary dimmer (KD-R01D) Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants