Hi, just getting in to HA, and iv spent the last 2 days trying to read a json files that Iv converted from a CSV. The format is:
{
"Time": "2022-12-13 23:0:33",
"Temperature": "0.0",
"PV1 Voltage[V]": "0.0",
"PV2 Voltage[V]": "0.0",
"PV1 Current[A]": "0.0",
"PV2 Current[A]": "0.0",
"Total energy[KW.Hr]": "0.0",
"Total operation hours[Hr]": "42562",
"Total AC Power[W]": "0",
"Mode": "PV power off",
"Daily Energy[KW.Hr]": "0.99"
}
But even with my best googlefoo I cant just seem to read those values in to HA. Iv managed to create a load of sensors to read another Json source (aBex fish tank water tested) which works fine, but I cant wrap my head around this.
This is one of my sensors:
#Solar
- platform: rest
name: Solar Power
resource: 'http://dc01/solar.json'
value_template: '{{value_json["Total AC Power[W]"]}}'
icon: mdi:water
unit_of_measurement: 'W'
scan_interval: 60
json_attributes:
- ["Total AC Power[W]"]
However I just get Unknown. Could someone explain like im 5 what Im doing wrong please? Thanks!