lpt2007
(lpt2007)
1
Hi
I send mqtt msg.payload from node-red to mqtt sensor in hass.
I can get value of msg.payload?
I try like this:
- platform: mqtt
name: "mqtt_sensing_wc"
state_topic: "home/bathroom/sensor/wc"
qos: 0
unit_of_measurement: ""
value_template: "{{ msg.payload }}"
but not working.
gpbenton
(Graham)
2
If you don’t add a value_template, the sensor will take the value of whatever is in the payload of the message. What is the content of the payload?
lpt2007
(lpt2007)
3
Whole message send from node-red to mqtt:
I wanna add payload: “brez” to my mqtt sensor.
gpbenton
(Graham)
4
Just remove the value_template
line, and it should work fine.
lpt2007
(lpt2007)
5
Thanks. I just do that and now is working
1 Like