@daniel-sthlm wrote:
I’m trying to choose the right value to be displayed in HA but I only get errors or too much values.
Of all messages I like this one to be displayed to show my cold water consumption:
{“media”:“cold water”,“meter”:“mkradio3”,“name”:“water01”,“id”:“823xxx”,“total_m3”:4.5,“target_m3”:1.6,“timestamp”:“2020-01-19T20:22:52Z”}but I also get messages like this with Unknown and with values that’s wrong:
{“media”:“Unknown”,“meter”:“mkradio3”,“name”:“water01”,“id”:“823xxx”,“total_m3”:0,“target_m3”:0,“timestamp”:“2020-01-19T20:23:11Z”}And my HA config looks like this when I get them all:
- platform: mqtt
state_topic: “wmbusmeters/823xxx”
name: “Cold water”
unit_of_measurement: ‘m3’
value_template: ‘{{ value_json[“total_m3”] }}’How can I create a config to ignore all values except the media with cold water and nice value in total_m3?
Posts: 1
Participants: 1