Zigbee2MQTT Tuya Moes Smart Knob (ERS-10TZBVK-AA)

I completely, agree, it’s fine as a button but for the rest it won’t do smooth light transition. It just doesn’t transmit rotation consistenly and quickly enough.

Too bad because it’s the entire point of a device looking like this. Oh well.

1 Like

I wonder if it works this badly even (turning the knob not feeling “analogue”) with the official Tuya app. Can anyone check? I don’t have a Tuya box to try.

I tested a little and in command mode it is faster a little, let's say functional.
To try it (with only single press, rotate right, rotate left),
1) change 'single' by  'toggle'
2) change 'rotate_right' by ''brightness_step_up''
2) change 'rotate_left' by ''brightness_step_down''

Also in command mode, we have info to set proportional values (action_step_size and action_transition_time. I think with tuya app  success to have something good with that and we can do same here

1 Like

or use this

blueprint:
  name: Zigbee2MQTT (ALEX) - Tuya Moes Smart Knob (Operation Mode = event)
  description: Automate your Tuya Smart Knob - ERS-10TZBVK-AA
  domain: automation
  input:
    switch:
      name: Tuya Smart Knob
      description: Tuya Smart Knob used as Button
      selector:
        entity:
          integration: mqtt
          domain: sensor
          multiple: false
    button_short_press:
      name: Single Press
      description: Action to run on single press (careful not to turn knob instead)
      default: []
      selector:
        action: {}
    button_double_press:
      name: Double Press
      description: Action to run on double press (careful not to turn knob instead)
      default: []
      selector:
        action: {}
    button_long_press:
      name: Long Press
      description:
        Action to run on long press (at least 4 seconds - careful not to
        turn knob instead)
      default: []
      selector:
        action: {}
    button_rotate_right:
      name: Rotate Right
      description: Action to run when Smart Knob is rotated right
      default: []
      selector:
        action: {}
    button_rotate_left:
      name: Rotate Left
      description: Action to run when Smart Knob is rotated left
      default: []
      selector:
        action: {}
  source_url: https://community.home-assistant.io/t/zigbee2mqtt-tuya-moes-smart-knob-ers-10tzbvk-aa/419989
mode: restart
max_exceeded: silent
trigger:
  - platform: state
    entity_id: !input switch
action:
  - variables:
      command: "{{ trigger.to_state.state }}"
  - choose:
      - conditions:
          - "{{ command == 'toggle' }}"
        sequence: !input button_short_press
      - conditions:
          - "{{ command == 'double' }}"
        sequence: !input button_double_press
      - conditions:
          - "{{ command == 'hold' }}"
        sequence: !input button_long_press
      - conditions:
          - "{{ command == 'brightness_step_up' }}"
        sequence: !input button_rotate_right
      - conditions:
          - "{{ command == 'brightness_step_down' }}"
        sequence: !input button_rotate_left

1 Like

Now it seem usable :slight_smile:
Make it to support 2 light, to control the second light, press the knob and turn … if you just press more than 3 second, it toggle it

blueprint:
  name: Zigbee2MQTT (ALEX) - Tuya Moes Smart Knob (Operation Mode = command and need "Home Assistant legacy entity attributes" check)
  description: Automate your Tuya Smart Knob - ERS-10TZBVK-AA
  domain: automation
  input:
    switch:
      name: Tuya Smart Knob
      description: Tuya Smart Knob used as Button
      selector:
        entity:
          integration: mqtt
          domain: sensor
          multiple: false
    light1:
      name: light 1
      description: light when know is not pressed
      selector:
        entity:
          domain: light
      default: []
    light2:
      name: light 2
      description: light when know is pressed
      selector:
        entity:
          domain: light
      default: []
    speed:
      name: speed of the knob
      description: multiplicator of the speed of light ;)
      selector:
        number:
          min: 0.1
          max: 1.0
          step: 0.1
      default: 0.5

mode: restart
max_exceeded: silent
trigger:
  - platform: state
    entity_id: !input switch
    not_to: ""
    attribute: action
action:
  - variables:
      command: "{{ trigger.to_state.state }}"
      step: "{{ trigger.to_state.attributes.action_step_size }}"
      time: "{{ trigger.to_state.attributes.action_transition_time }}"
      speed: !input speed
  - choose:
      - conditions:
          - "{{ command == 'toggle' }}"
        sequence:
          - service: light.toggle
            entity_id: !input light1
      - conditions:
          - "{{ command == 'hue_move' }}"
        sequence:
          - service: light.toggle
            entity_id: !input light2
      - conditions:
          - "{{ command == 'brightness_step_up' }}"
        sequence:
          - service: light.turn_on
            entity_id: !input light1
            data:
              brightness_step_pct: "{{speed*step}}"
      - conditions:
          - "{{ command == 'brightness_step_down' }}"
        sequence:
          - service: light.turn_on
            entity_id: !input light1
            data:
              brightness_step_pct: "-{{speed*step}}"
      - conditions:
          - "{{ command == 'color_temperature_step_up' }}"
        sequence:
          - service: light.turn_on
            entity_id: !input light2
            data:
              brightness_step_pct: "{{speed*step}}"
      - conditions:
          - "{{ command == 'color_temperature_step_down' }}"
        sequence:
          - service: light.turn_on
            entity_id: !input light2
            data:
              brightness_step_pct: "-{{speed*step}}"
4 Likes

Hi, i have it connected to official tuya app, and it is working fine, dimming lights without any issues.

And there isn’t a way to translate that (smooth behavior) to HA, is there? I’d like to control Sonos volume with it for example.

Is there a way to besides turning on a device, also set its brightness to the max?

For example:

type: toggle
device_id: 123456789
entity_id: light.livingroom_light
domain: light

if:
  - condition: device
    type: is_on
    device_id: 123456789
    entity_id: light.livingroom_light
    domain: light
then:
  - service: mqtt.publish
    data:
      topic: zigbee2mqtt/livingroom_light/set
      payload: "{\"brightness\": \"254\"}"

I tried to do this, but it didn’t work.
How I am suppose to use the “single press” to toggle the light and if the light is on, also set its brightness?

Thanks :smiley:

Yep, works fine in Tuya. I now have 5 of them and they work great to dim lights. Very smooth in Tuya

How do you integrate them? I mean, with what hardware?

Hi. Just informally sharing my Automation (not Blueprint) for Command mode, which has:

  • Press: toggle light (customizable)
  • Rotate: increase/decrease brightness, taking the actionstep_size (rotation speed) into account!. All customizable (note the 0.5) and with smooth transition (0.1 which makes a huge difference, but customizable)
  • Press & Rotate: color temperature, taking the actionstep_size (rotation speed) into account!. All customizable (note the 0.5) and with smooth transition (0.1 which makes a huge difference, but customizable).

Just finished it (got the remote a couple hours ago) and working great. Better than the original E1810 or a Symfonisk remote (smoother but linear steps and sometimes not sending stop).

alias: Tuya Smart Knob Despacho (Command mode)
description: ""
trigger:
  - platform: mqtt
    topic: zigbee2mqtt/Knob Despacho
condition: []
action:
  - variables:
      command: "{{ trigger.payload_json.action }}"
      size: "{{ trigger.payload_json.action_step_size }}"
  - choose:
      - conditions: "{{ trigger.payload_json.action == 'toggle' }}"
        sequence:
          - type: toggle
            device_id: 1897375465164b1f0d9641c9b784a03b
            entity_id: light.despacho
            domain: light

      - conditions: "{{ command == 'brightness_step_up' }}"
        sequence:
          - service: mqtt.publish
            data:
              topic: zigbee2mqtt/Despacho/set
              payload: >
                {"brightness_step_onoff": {{( size * 0.5)|round}},"transition":0.1 }

      - conditions: "{{ command == 'brightness_step_down'  }}"
        sequence:
          - service: mqtt.publish
            data:
              topic: zigbee2mqtt/Despacho/set
              payload: >
                {"brightness_step": -{{( size * 0.5)|round}},"transition":0.1 }

      - conditions: "{{ command == 'color_temperature_step_up' }}"
        sequence:
          - service: mqtt.publish
            data:
              topic: zigbee2mqtt/Despacho/set
              payload: >
                {"color_temp_step": {{ size * 0.5}},"transition":0.1 }

      - conditions: "{{ command == 'color_temperature_step_down' }}"
        sequence:
          - service: mqtt.publish
            data:
              topic: zigbee2mqtt/Despacho/set
              payload: >
                {"color_temp_step": -{{ size * 0.5 }},"transition":0.1 }

mode: single
max_exceeded: silent
3 Likes

Check my recent comment :wink:

@gregolin command mode you asked.
@husnain.ali09 smooth transition.
@aussie1497 check too
@Stooovie I understand your frustration. Check if my automation above improves it for you

For volume, I’m using this to make it smooth with my Symfonisk remote on a Google Home. It could be used here, maybe even combining it with the action_step_size (check my previous comment and play with the template :slight_smile: )

      - service: media_player.volume_set
        target:
          entity_id: media_player.salon
        data:
          volume_level: "{{ state_attr('media_player.salon', 'volume_level') +0.02 }}"
1 Like

remove the quotes (and ) from the 254.
Also check that the topic is really zigbee2mqtt/livingroom_light/set

I’ve tried this below but it didn’t work either:

type: toggle
device_id: 996a7eeccb057b67d0e2383cbd9ba4dc
entity_id: light.controlador_led_armario_cozinha
domain: light
if:
  - condition: device
    type: is_on
    device_id: 996a7eeccb057b67d0e2383cbd9ba4dc
    entity_id: light.controlador_led_armario_cozinha
    domain: light
then:
  - service: mqtt.publish
    data:
      topic: zigbee2mqtt/Controlador LED Armario Cozinha/set
      payload: "{\"brightness\":254}"

If I run only the mqtt.publish block, it sets the brightness as expected.
But I think using a “IF” to detect if the led is on or not is not fast enought, because after using the smart knob, it takes a couple miliseconds to the LED to turn on. So maybe I should be using something else directly in the “toggle” function.

ah, I understand your code now! it’s the Sequence part. You’re first turning it on, then running the if.
Right, that doesn’t work sometimes. So:

a) You set a delay after Toggle. (I don’t know, try 200ms). Then run the if
b) (What I do): Run the if as first thing:
if light is on: turn off
else (or else if Light is off): turn on at brightness 254.

That works for me in all my buttons.

1 Like

Hi
using the Smart Knob with some lights in the Smart life Tuya app over a wireless gateway was very convenient and smooth:

  • immediately reaction of the light when pressing the Knob (no delay!) :+1:
  • Rotation is smooth dimmer and color change

Now I,m moving all my devices and sensors to
Raspi4 with Home-Assistant in Docker, with Zigbee2MQTT
End goal is to have the own control and nothing runs over an external cloud

so far running fine.

now with trying to have the same functions like in Smart life app, I started to setup the scenes, automation… in Home-Assistant.
but what I tried here direct in HA, or using the several blueprints i found in this community:

I got always delay in reaction time of 1-2 seconds
the dimmer is not smooth and with a delay and in to big steps

any hints where to look into??
where is the delay coming from?
or is there also the possibility to get the scenes and automation out from the Tuya app or IOT? s yaml or so…

1 Like

I can’t seem to get this blueprint to recognize my smart knob. I have the latest Z2M running, the device is picked up just fine. I can see the actions being reported in HA. However, when I try to use this blueprint, HA doesn’t find the smart knob and I can’t seem to select it. Ideas?

i had the same “issue”. Have added the name manually
sensor.%deviceID%_action

where i grabbed %deviceID% from zigbee2mqtt → click on the device → tab ‘settings’ → first input field

By the way, if you click the button 3 times very quickly, it will switch between “event” and “command” mode.