I’m trying to create an automation using this knob to increase/decrease the color temperature of a Hue light.
I had some success using an action like this, triggered by the color_temperature_step_up event in command mode:
action: light.turn_on
metadata: {}
data:
kelvin: >
{% set rotation = states( 'sensor.rotating_smart_knob_action_step_size') | float %}
{% set min_temp = 2000 %} {% set max_temp = 6500 %}
{{ min_temp + (max_temp - min_temp) * (rotation /100) }}
target:
entity_id: light.hue_go_1
However, while testing I noticed that the light indeed increases the color temp when pressing and turning the knob as expected, but right after that, it turns back to a lower color temp. After some investigation, I discovered that the event is sent twice, the first time with the correct values, but the second time with a lower value, and this triggers the automation twice (I see 2 traces), with the second one changing the color temp incorrectly.
Heres the MQTT log for a (suposedly) single press and turn event:
info 2025-02-16 19:01:32z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Rotating Smart Knob', payload '{"action":"color_temperature_step_up","action_rate":null,"action_step_size":120,"action_transition_time":0.03,"battery":82,"linkquality":255,"operation_mode":"command","voltage":2900}'
info 2025-02-16 19:01:32z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Rotating Smart Knob/action', payload 'color_temperature_step_up'
info 2025-02-16 19:01:32z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Rotating Smart Knob', payload '{"action":"color_temperature_step_up","action_rate":null,"action_step_size":18,"action_transition_time":0.01,"battery":82,"linkquality":255,"operation_mode":"command","voltage":2900}'
info 2025-02-16 19:01:32z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Rotating Smart Knob/action', payload 'color_temperature_step_up'
Seems like this a problem with the knob itself, but is it something that can be fixed changing any setting in the MQTT configuration?