Tuya ZigBee "Smart Knob"

Hi,
Just to report the knob works just fine with ZHA and a custom quirk ( the same quirk used for the tuya 4 gang switches): https://github.com/zigpy/zha-device-handlers/pull/969

The knob have two mode which i call the toggle and press mode.
You notify the device you change modes by doing a tripple press on the center button.
The toggle mode send:

  • Press
  • Long Press
  • Release on long press
  • Rotary step information: Left or Right and the step size

The event mode:

  • Single click
  • Double click
  • Long Press ( not tested )
  • Rotate right ( without step size )
  • Rotate left ( without step size )

Please note that the toggle mode, the step size trigger condition are hardcoded in the script and there is a small bug in ha that trigger the slow right rotate after a slow left rotate.
I’ll try to use this mode with event condition in the automation when i’ll figure how to compare the values ( greater or lower than )