Hi everyone.
I’m trying to integrate the various functions that the zigbee remote control has, and I’m stuck on some things.
I’ll explain:
The device in question is: https://www.zigbee2mqtt.io/devices/MLI-404011.html integratet with Zigbee2Mqtt, and works correctly.
When i press the color circle, in the log have the x and y value on color based, like:
zigbee2mqtt:info 2020-03-27 20:57:21: MQTT publish: topic 'zigbee2mqtt/Tint', payload '{"linkquality":70,"rate":100,"action_color":{"x":0.118,"y":0.197},"action":"color_wheel","transition_time":0}'
I have created a sensor to extract exactly the x and y values, like this:
sensor:
- platform: "mqtt"
name: Tint Remote XY
state_topic: "zigbee2mqtt/Tint"
availability_topic: "zigbee2mqtt/bridge/state"
icon: "mdi:gesture-double-tap"
value_template: '{{ value_json.action_color.x }},{{ value_json.action_color.y }}'
and everything is ok. I have the sensor.tint_remote_xy with the value 0.118,0.197
Now i want to use this sensor in the automation, like this:
automation:
- alias: Tint Ser Color Led strip TV
trigger:
- platform: mqtt
topic: zigbee2mqtt/Tint
action:
- service: light.turn_on
data_template:
entity_id: light.led_tv
brightness: 250
xy_color: ['{{ states.sensor.tint_remote_xy.state }}']
but something goes wrong. The Automation triggered correctly but does not set the color. It works properly if i put:
xy_color: [0.118,0.197]
How to adjust this problem? thank you