I was able to successfully scrape some data from NOAA.gov, but having trouble with a couple data points. I’m not sure I’m using the correct path in the value_template
I was using this to determine the path: https://jsonpathfinder.com/
The URL: https://services.swpc.noaa.gov/products/noaa-scales.json
The Response:
{"0":{"DateStamp":"2024-09-19","TimeStamp":"22:44:00","R":{"Scale":"0","Text":"none","MinorProb":null,"MajorProb":null},"S":{"Scale":"0","Text":"none","Prob":null},"G":{"Scale":"0","Text":"none"}},"1":{"DateStamp":"2024-09-19","TimeStamp":"22:44:00","R":{"Scale":null,"Text":null,"MinorProb":"45","MajorProb":"10"},"S":{"Scale":null,"Text":null,"Prob":"10"},"G":{"Scale":"0","Text":"none"}},"2":{"DateStamp":"2024-09-20","TimeStamp":"00:00:00","R":{"Scale":null,"Text":null,"MinorProb":"45","MajorProb":"10"},"S":{"Scale":null,"Text":null,"Prob":"10"},"G":{"Scale":"0","Text":"none"}},"3":{"DateStamp":"2024-09-21","TimeStamp":"00:00:00","R":{"Scale":null,"Text":null,"MinorProb":"45","MajorProb":"10"},"S":{"Scale":null,"Text":null,"Prob":"10"},"G":{"Scale":"0","Text":"none"}},"-1":{"DateStamp":"2024-09-18","TimeStamp":"22:44:00","R":{"Scale":"0","Text":"none","MinorProb":null,"MajorProb":null},"S":{"Scale":"0","Text":"none","Prob":null},"G":{"Scale":"1","Text":"minor"}}}
The sensor:
- platform: template
sensors:
solar_r_noaa:
friendly_name: "Solar R"
value_template: "{{ state_attr('sensor.aurora_noaa_space_weather_conditions', '0.R.Scale')}}"