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

What is the sensor data format?

$
0
0

@stevemann wrote:

I have a device that is publishing a JSON string of various status values.

In my sensors.yaml include file, I have this entry:

  • platform: mqtt
    name: “Garden_Status”
    force_update: true
    state_topic: “garden2/statusJson”

In Developer Tools, States, I can see the sensor, but the data is the whole JSON string:
{"temp":"77.68","wet":"114","raw":"861","rssi":"-66","sleep":"10"}
How can I split it into attributes to use in an automation, for example?
(I am guessing that I need to use a template, but how?)

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 99036

Trending Articles



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