HyBird
July 19, 2022, 11:26pm
1
Hello Hassio Community,
i want to publish the data of the sensor specified in the payload with a offset from 5
how i can simply add 5 to this sensor value? How is the correct systax please?
Thanks in advance…
service: mqtt.publish
data:
topic: cmnd/tasmota_57B008/TEMPMEASUREDSET
payload: '{{ states(''sensor.lumi_lumi_weather_f75b0208_humidity'') }}'
nickrout
(Nick Rout)
July 20, 2022, 8:58am
2
'{{ (states(''sensor.lumi_lumi_weather_f75b0208_humidity'')|float) + 5 }}'
HyBird
July 20, 2022, 1:42pm
3
@ nickout: Thank you very mutch now it makes sense.
First i got a error. but i got it working with the payload_template:
The Solution is:
service: mqtt.publish
data:
topic: cmnd/tasmota_57B008/temptargetset
payload_template: '{{ (states(''sensor.lumi_lumi_weather_2f0e3308_humidity'')|float) + 10 }}'
Z4RR0
(Z4 Rr0)
May 5, 2023, 11:12am
4
hi i’m a newbie how i need to write this to format varius data of a pzem and give a offset of mqtt data??
thank’s in adavance and sorry for my bad basic english