Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95544

How to only accept mqtt json value if other attribute correct

$
0
0

@nottledim wrote:

I’m having trouble trying to understand how to only use sensor mqtt messages that are of the correct type.

So I have topic/messages that look like:
emon/data {“type”:“power”, “pwr1”:688.0, …
emon/data {“type”:“totals”, “timp”:458782980, …

So for displaying the power I need to use only message where type == power and ignore the others.
Likewise for totals type and others.

I’m not sure that templating is quite the right place to filter the messages but I can’t even get that to work (probably because I don’t know how).

Any thoughts?

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95544

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>