#how do you read mqtt incomming Text and out it to a sensor
1 messages · Page 1 of 1 (latest)
mqtt in node into a sensor node
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
What is the output of the mqtt node? a string, json?
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
If you have the Node-RED custom component, https://github.com/zachowj/hass-node-red/, installed in Home Assistant. You can use the sensor node, https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/sensor.html, in Node-RED connected to the mqtt node and it will create a sensor in Home Assistant and set its value from msg.payload of the mqtt node
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