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

Handling a string from json file

$
0
0

@bnetse wrote:

I am using the file platform to get information from a json file that is a scrape of my weatherstation.

The file looks like this:


`{"outHumi": "98", "RelPress": "1013.40", "uvi": "2", "avgwind": "0.0", "rainofyearly": "741.90", "windir": "258", "IndoorID": "0x--", "eventrain": "5.30", "solarrad": "143.75", "inTemp": "21.1", "Outdoor2ID": "0x--", "inHumi": "82", "pm25": "----", "rainofmonthly": "618.00", "rainofdaily": "0.00", "dailygust": "1.0", "Outdoor1ID": "0x61", "rainofweekly": "26.60", "AbsPress": "936.50", "rainofhourly": "0.00", "uv": "701", "outTemp": "20.4", "outBattSta2": "- -", "outBattSta1": "Normal", "inBattSta": "Normal", "gustspeed": "0.0"}`

My configuration is:

 - platform: file
     name: 'Outdoor Battery'
     file_path: /home/homeassistant/weatherStationData.json
     value_template: '{{ value_json.outBattSta }}'

to get the battery status which is currently “Normal”

In home Assistant I get something for this sensor, but not the “Normal” bit

Any ideas? Im sure its pretty simple, I just can’t find the missing bit.

Thanks
Ben

Posts: 5

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



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