S70
(Simone)
1
Hello everybody.
I can’t get the values I select with the cursor to publish. Where am I wrong? I’m going crazy…
## configuration.yaml
input_number:
target_temp:
name: Temperature
initial: 26
min: 18
max: 30
step: 1
## automation.yaml
automation:
- alias: "Temp slider moved"
trigger:
platform: state
entity_id: input_number.target_temp
action:
service: mqtt.publish
data:
topic: "setTemperature"
retain: true
payload: "{{ states('input_number.target_temp') | int }}"
Why are messages not published ???
`
Dujith
(Charles Evers)
2
When you look in automation and adjust the temp slider, does it show as triggered? Should flash on top of the trigger with the message “Triggered”
S70
(Simone)
3
I’m not very experienced … If you mean when I move the cursor to raise or lower the temperature, the temperature value appears above the cursor …
Dujith
(Charles Evers)
4
I mean in Automations, when you look at it in the GUI editor.
As shown in the blog: 2022.3: Select and play media
tom_l
5
payload_template: "{{ states('input_number.target_temp') | int }}"
^^^^^
|||||
S70
(Simone)
6
Thanks, with the gui it worked !!!
- id: '1648737530359'
alias: Temp slider moved
description: ''
trigger:
- platform: state
entity_id: input_number.target_temp
action:
- service: mqtt.publish
data:
topic: setTemperature
payload: "{{ states('input_number.target_temp') | int }}"