Hi
I’ve searched a bit and found and adopted the following code
- alias: Set backdrop slider
trigger:
platform: mqtt
topic: "lights/backdrop/status"
action:
service: input_slider.select_value
data_template:
entity_id: input_slider.backdrop
value: '{{ trigger.payload.state | int }}'
My problem is I don’t have enough knowledge to decode the mqtt payload to set the slider using the state
part of the payload
the topic is lights/backdrop/status
it returns the following
{
“log”: “GPIO 5 Set PWM to 0”,
“plugin”: 1,
“pin”: 5,
“mode”: “PWM”,
“state”: 0
}
Any help would be much appreciated