Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 103090

Struggling with MQTT Publish

$
0
0

I’m a little lost with something basic. I need to publish the value of an input slider to an MQTT topic. I confused as to how to do this and how to get the actual value. I don’t know if I need a template or if there is some syntax I’m missing to create the payload.

What needs to be published is something like

{"setpoint":100}

where the 100 comes from the slider. In my automation I’ve tried different combinations of

payload: "setpoint" : input_number.spa_temperature_set_point

using quotes, single quotes. I’ve also tried

payload: "setpoint" : {{states('input_number.spa_temperature_set_point') | int }}

In all case, what gets published is just that entire string of text. I never get the numeric value.

Can someone point me in the right direction here?

Thanks!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 103090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>