@PeetsHome wrote:
Hello all, iám rather new on HA and having some questions about MQTT sensor readings / formatting
In the template editor it works ok{{ states(‘sensor.DB199_OB098’) | round(0) }}
{{ (states(‘sensor.DB199_OB097’)|float * 1 / 1000) | round(3)}}But when i put this in my configuration.yaml .is not diplaying getting any data, also no error message.
platform: mqtt
state_topic: ‘DB199-OB098’
name: “db199-ob098”
value_template: ‘{{ states(sensor.db199_ob098) | round(0) }}’
unit_of_measurement: ‘Watt’platform: mqtt
state_topic: ‘DB199-OB097’
name: “db199-ob097”
value_template: ‘{{ ( states(sensor.db199_ob097)|float * 1 / 1000) | round(3)}}’
unit_of_measurement: ‘kWh’If i remove the value_template the unformatted values are dislayed like +0.3062391E+03 Watt
Posts: 2
Participants: 2