#how do you read mqtt incomming Text and out it to a sensor

1 messages · Page 1 of 1 (latest)

timber void
#

hi im looking at being able to read mqtt topic and export the text message to a template sensor but i dunno how you do that...

hollow hazel
#

mqtt in node into a sensor node

timber void
#

ya i dunno how to do that either just the the mqtt node that reads the topic and in a debug so i know its working but i dunno how to go from there

hollow hazel
#

What is the output of the mqtt node? a string, json?

timber void
#

a string ... so say if the message is "hello world" or "raining" "im home" that would go into the sensor as a text

#

and i dont understand what a json really is

hollow hazel
timber void
#

ok so i kinda got it working... i did a test python file as i have a caller id program i wanna mqtt to to home assistant... but its not working... i googled.. about the mqtt and found {$example} but its not working here is what i got... but i cant pass the string do you happen to know how to edit python scripts?

#

ive tried "{$number}" {number} $number etc but nothing works