I am exporting data from my google sheet into an json output format which is something like this (see below) using the following yaml sensor below but it’s not working. I’m trying to get the value of c1_value.
Anybody can help me out here?
- platform: file
name: EOS_file
file_path: "/home/homeassistant/.homeassistant/scripts/sort.json"
value_template: "{{value_json['name']['C1_Value']['value']}}"
unit_of_measurement: "EUR"
Error:
Error parsing value: 'list object' has no attribute 'name'
JSON output:
[{"name":"C1_Value","value":1465.7083623303001},{"name":"C1_Profit","value":692.7883623303002},{"name":"C1_Change","value":0.8963260910964915},{"name":"C2","value":"REQ"},{"name":"C2_Value","value":1259.3023474},{"name":"C2_Profit","value":-26.31865259999995},{"name":"C2_Change","value":-0.02047154845790474},{"name":"C3","value":"POWR"},]