Did you solve your problem? Because i´ve the same issue. Only the toggle works but not the brightness by rotating the knob. I get same payload issues as you.
My device is a bit different then the mentioned knob:
No unfortunately not, link if you figure something out ![]()
Hi, I am having the exact same problem. Did you find a solution ?
Still no solution. Only the press and hold function works reliably for me. Maybe OP (@TriggerHappy) can have a look at the payloads I sent and advise?
@TriggerHappy Hi, thanks for blueprint but i found 2 big problems and one smaller (and fix them in my copy of this blueprint)
-
When you set brightness when command is ‘brightness_step_up’ there should be set min from [new_brightness, max_brightness] not max like in script.
-
In script you use input min_brightness and max_brightness in range 0 to 100. Next you set variables from this inputs and for example (when 1 point will be fixed) set min from [new_brightness, max_brightness] but brightess in light is in range from 0 to 255
This way when u set 100% max brightness in input it will be 100/255 and it will never set higher.
You need to set new variable with value (max_brightness * 255) / 100 and use this new variable when setting min/max brightness -
(not bug but can help) in variables u set step_percent as step_size / 2
I get logs from zigbee2mqtt and one click on knob sends step_size=13 (don’t know why 13 but i get it from logs) so in my copy i want to change 1% every knob click (and added multiplier input if i want more for every click) and set step_percent = step_size / 13
Guys, does the MOES version work well, properly? I’m ready to buy a few if they do.
thx!
Works better than my own automation! Well done!
But… Long press and turn this knob at the same time is a little difficult because of the low quality case and parts used. Needs two hands to do that.
Is it possible to use double press to toggle brightness/temperature setting instead of keep pressing?
And after some seconds finished setting whatever the user wants it could default back to brightness.
In my automation I used a helper to activate the toggle and command as trigger so it never satisfied me. Command mode and mqtt seems to work a lot smoother.
Also, there is a better smart knob out there, works the same way, looks like it’s a better construction. The whole device rotates and can be pushed as a button and not some inner thingy. Big plus for me you can use it with one hand!
Search for model ZG-101Z/D
I bet it’s works with the blueprint, will try later… And… No, it doesn’t!
Hi,
Could you find a blueprint that works with ZG-101Z/D ? I can’t find one
I just updated the blueprint.
Fixed some mistakes and added an option to configure the button long press (without turning the wheel) with any Home Assistant action.
Hi it does work with the ZG-101Z/D. you only have to press the button 3 times in a row so it will toggle the command mode
Is it also possible to scroll through an RGB color wheel? Has anyone managed to create something like that
Hi, some time ago after HA update knob stop to dim at all… I made some corrections in code, would you check if it works now?
blueprint:
name: "Control light entity with Tuya ERS-10TZBVK-AA Smart Knob (command mode) - v 1.1"
description: >
Blueprint to easily configure the **Tuya ERS-10TZBVK-AA Smart Knob** to control a light entity when integrated into Home Assistant using **Zigbee2MQTT**.
It is based directly on the MQTT-Topic as this turned out to be the most responsive way to automate this dimmer device.
Also see [the device page](https://www.zigbee2mqtt.io/devices/ERS-10TZBVK-AA.html) on the Z2M homepage for more information.
**Important Note:** The device needs to be in **COMMAND mode** – the other one being EVENT mode – for the automation to work. However the blueprint will automatically check for the correct mode and should keep the device in COMMAND.
Do a triple button press to change mode manually. You can also see the current mode in the corresponding HA device page or in Zigbee2MQTT.
<details>
<summary><b>Actions</b></summary>
- Press button: Toggle light
- Long press: Choose any Action.
- Turn left/right: Change brightness / dim light
- Press, hold **and then** turn left/right: Change color temperature
</details>
<details>
<summary><b>Features</b></summary>
- The automation checks on correct mode of the smart knob and will keep it in **COMMAND** mode.
- The maximum and especially minimum brightness is adjustable and therefore can prevent switching off the light by dimming too low – just set minimum brightness >0.
- Minimum and maximum color temperature can be set. See [here](https://en.wikipedia.org/wiki/Color_temperature) to match Kelvin values with your desired effect.
- Fine-tune the resolution of the color temperature adjustments through step multiplier (1-10).
</details>
source_url: https://raw.githubusercontent.com/TriggrHappy/blueprint_tuya_smart_knob/refs/heads/main/blueprint.yaml
domain: automation
input:
mqtt_topic:
name: MQTT Topic
description: "The parent MQTT topic of the smart knob (e.g. 'zigbee2mqtt/Tuya Smart Knob)'. Typically the last part will be the given name of your device."
selector:
text:
light_entity:
name: Light Entity
description: "The light to be controlled."
selector:
entity:
filter:
- domain: light
long_press_action:
name: Long Press Action
description: "Choose an action for button long press (>3 seconds). Leave blank if you do not want to use it."
default: []
selector:
action: {}
brightness_multiplier:
name: Brightness Step Multiplier
description: "Multiplier for brightness change per knob click. Higher values = faster brightness changes."
default: 5
selector:
number:
min: 1
max: 5
mode: slider
step_multiplier:
name: Color Temperature Step Multiplier
description: "Multiplier for color temperature change. I.e. in which resolution do you want to fine tune color temperature? (1 = very slow change; 50 = fast change)"
default: 10
selector:
number:
min: 1
max: 50
mode: slider
kelvin_min:
name: Minimum Color Temperature (Kelvin)
description: "The minimum color temperature in Kelvin. (Default 2000)"
default: 2000
selector:
number:
min: 1000
max: 6500
kelvin_max:
name: Maximum Color Temperature (Kelvin)
description: "The maximum color temperature in Kelvin. (Default 6500)"
default: 6500
selector:
number:
min: 1000
max: 6500
min_brightness:
name: Minimum Brightness (%)
description: "The minimum brightness you want the light to dim. Set 0 to be able to turn off the light with the dimmer. (Default 1)"
default: 1
selector:
number:
min: 0
max: 100
max_brightness:
name: Maximum Brightness (%)
description: "The maximum brightness you want the light to dim. (Default 100)"
default: 100
selector:
number:
min: 0
max: 100
light_transition:
name: Light Transition
description: "Configure light transition. Set to 0 to disable transition. (Default 0.2)"
default: 0.2
selector:
number:
min: 0.0
max: 4.0
step: 0.1
unit_of_measurement: seconds
automation_mode:
name: Automation Mode
description: "Experiment with the different modes if your experience does not feel smooth enough. Normally single should work alright. (Also see https://www.home-assistant.io/docs/automation/modes/ )"
default: single
selector:
select:
mode: dropdown
options:
- single
- restart
- queued
- parallel
trigger:
- platform: mqtt
topic: !input mqtt_topic
condition: []
action:
- variables:
command: "{{ trigger.payload_json.action }}"
raw_step_size: "{{ trigger.payload_json.action_step_size | default(none) }}"
step_size: >-
{% if raw_step_size is not none and raw_step_size != '' %}
{{ raw_step_size | int }}
{% else %}
13
{% endif %}
step_percent: "{{ (step_size / 13.0) | round }}"
brightness_multiplier: !input brightness_multiplier
step_multiplier: !input step_multiplier
kelvin_min: !input kelvin_min
kelvin_max: !input kelvin_max
min_brightness: !input min_brightness
max_brightness: !input max_brightness
min_brightness_scaled: "{{ (min_brightness * 255 / 100) | int }}"
max_brightness_scaled: "{{ (max_brightness * 255 / 100) | int }}"
light_transition: !input light_transition
mqtt_topic: !input mqtt_topic
light_entity: !input light_entity
- choose:
- conditions:
- condition: template
value_template: "{{ command == 'single' or command == 'double' or command == 'rotate_left' or command == 'rotate_right' or command == 'hold' }}"
sequence:
- service: mqtt.publish
data:
topic: "{{ mqtt_topic }}/set"
payload: '{"operation_mode": "command"}'
- conditions:
- condition: template
value_template: "{{ command == 'toggle' }}"
sequence:
- service: light.toggle
target:
entity_id: !input light_entity
- conditions:
- condition: template
value_template: "{{ command == 'brightness_step_down' or command == 'rotate_left' }}"
sequence:
- service: light.turn_on
target:
entity_id: !input light_entity
data:
brightness: >-
{% set current_brightness = state_attr(light_entity, 'brightness') | int %}
{% set brightness_change = step_percent * brightness_multiplier %}
{% set new_brightness = current_brightness - brightness_change %}
{{ [new_brightness, min_brightness_scaled] | max }}
transition: !input light_transition
- conditions:
- condition: template
value_template: "{{ command == 'brightness_step_up' or command == 'rotate_right' }}"
sequence:
- service: light.turn_on
target:
entity_id: !input light_entity
data:
brightness: >-
{% set current_brightness = state_attr(light_entity, 'brightness') | int %}
{% set brightness_change = step_percent * brightness_multiplier %}
{% set new_brightness = current_brightness + brightness_change %}
{{ [new_brightness, max_brightness_scaled] | min }}
transition: !input light_transition
- conditions:
- condition: template
value_template: "{{ command == 'color_temperature_step_up' }}"
sequence:
- service: light.turn_on
target:
entity_id: !input light_entity
data:
color_temp: >-
{% set current_mired = state_attr(light_entity, 'color_temp') %}
{% if current_mired is not none %}
{% set current_kelvin = 1000000 / current_mired %}
{% set new_kelvin = [current_kelvin + (step_percent * step_multiplier), kelvin_max] | min %}
{{ 1000000 / new_kelvin }}
{% else %}
{{ 1000000 / 2800 }}
{% endif %}
transition: !input light_transition
- conditions:
- condition: template
value_template: "{{ command == 'color_temperature_step_down' }}"
sequence:
- service: light.turn_on
target:
entity_id: !input light_entity
data:
color_temp: >-
{% set current_mired = state_attr(light_entity, 'color_temp') %}
{% if current_mired is not none %}
{% set current_kelvin = 1000000 / current_mired %}
{% set new_kelvin = [current_kelvin - (step_percent * step_multiplier), kelvin_min] | max %}
{{ 1000000 / new_kelvin }}
{% else %}
{{ 1000000 / 2800 }}
{% endif %}
transition: !input light_transition
- conditions:
- condition: template
value_template: "{{ command == 'hue_move' }}"
sequence: !input long_press_action
mode: !input automation_mode
max_exceeded: silent