I am working on an accuweather api call to get a 12hr forecast.
I am struggling to retrieve the data and get it into the sensors with the attributes.
I understand the RESTful sensor attributes, but they are usually used in a cascaded view. Meaning the attributes are one layer down in the array. However my attributes are the hourly for each of the sensors.
Here is the response:
[
{
"DateTime": "2024-02-17T00:00:00-06:00",
"EpochDateTime": 1708149600,
"WeatherIcon": 7,
"IconPhrase": "Cloudy",
"HasPrecipitation": false,
"IsDaylight": false,
"Temperature": {
"Value": 50.0,
"Unit": "F",
"UnitType": 18
},
"RealFeelTemperature": {
"Value": 42.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Chilly"
},
"RealFeelTemperatureShade": {
"Value": 42.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Chilly"
},
"WetBulbTemperature": {
"Value": 46.0,
"Unit": "F",
"UnitType": 18
},
"WetBulbGlobeTemperature": {
"Value": 47.0,
"Unit": "F",
"UnitType": 18
},
"DewPoint": {
"Value": 40.0,
"Unit": "F",
"UnitType": 18
},
"Wind": {
"Speed": {
"Value": 13.8,
"Unit": "mi/h",
"UnitType": 9
},
"Direction": {
"Degrees": 6,
"Localized": "N",
"English": "N"
}
},
"WindGust": {
"Speed": {
"Value": 25.3,
"Unit": "mi/h",
"UnitType": 9
}
},
"RelativeHumidity": 68,
"IndoorRelativeHumidity": 36,
"Visibility": {
"Value": 10.0,
"Unit": "mi",
"UnitType": 2
},
"Ceiling": {
"Value": 30000.0,
"Unit": "ft",
"UnitType": 0
},
"UVIndex": 0,
"UVIndexText": "Low",
"PrecipitationProbability": 5,
"ThunderstormProbability": 0,
"RainProbability": 5,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Rain": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Snow": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Ice": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"CloudCover": 95,
"Evapotranspiration": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"SolarIrradiance": {
"Value": 0.0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=0&lang=en-us",
"Link": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=0&lang=en-us"
},
{
"DateTime": "2024-02-17T01:00:00-06:00",
"EpochDateTime": 1708153200,
"WeatherIcon": 7,
"IconPhrase": "Cloudy",
"HasPrecipitation": false,
"IsDaylight": false,
"Temperature": {
"Value": 48.0,
"Unit": "F",
"UnitType": 18
},
"RealFeelTemperature": {
"Value": 39.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"RealFeelTemperatureShade": {
"Value": 39.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"WetBulbTemperature": {
"Value": 44.0,
"Unit": "F",
"UnitType": 18
},
"WetBulbGlobeTemperature": {
"Value": 48.0,
"Unit": "F",
"UnitType": 18
},
"DewPoint": {
"Value": 38.0,
"Unit": "F",
"UnitType": 18
},
"Wind": {
"Speed": {
"Value": 15.0,
"Unit": "mi/h",
"UnitType": 9
},
"Direction": {
"Degrees": 5,
"Localized": "N",
"English": "N"
}
},
"WindGust": {
"Speed": {
"Value": 28.8,
"Unit": "mi/h",
"UnitType": 9
}
},
"RelativeHumidity": 68,
"IndoorRelativeHumidity": 33,
"Visibility": {
"Value": 10.0,
"Unit": "mi",
"UnitType": 2
},
"Ceiling": {
"Value": 30000.0,
"Unit": "ft",
"UnitType": 0
},
"UVIndex": 0,
"UVIndexText": "Low",
"PrecipitationProbability": 0,
"ThunderstormProbability": 0,
"RainProbability": 0,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Rain": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Snow": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Ice": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"CloudCover": 95,
"Evapotranspiration": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"SolarIrradiance": {
"Value": 0.0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=1&lang=en-us",
"Link": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=1&lang=en-us"
},
{
"DateTime": "2024-02-17T02:00:00-06:00",
"EpochDateTime": 1708156800,
"WeatherIcon": 7,
"IconPhrase": "Cloudy",
"HasPrecipitation": false,
"IsDaylight": false,
"Temperature": {
"Value": 47.0,
"Unit": "F",
"UnitType": 18
},
"RealFeelTemperature": {
"Value": 37.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"RealFeelTemperatureShade": {
"Value": 37.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"WetBulbTemperature": {
"Value": 42.0,
"Unit": "F",
"UnitType": 18
},
"WetBulbGlobeTemperature": {
"Value": 47.0,
"Unit": "F",
"UnitType": 18
},
"DewPoint": {
"Value": 36.0,
"Unit": "F",
"UnitType": 18
},
"Wind": {
"Speed": {
"Value": 16.1,
"Unit": "mi/h",
"UnitType": 9
},
"Direction": {
"Degrees": 6,
"Localized": "N",
"English": "N"
}
},
"WindGust": {
"Speed": {
"Value": 27.6,
"Unit": "mi/h",
"UnitType": 9
}
},
"RelativeHumidity": 68,
"IndoorRelativeHumidity": 31,
"Visibility": {
"Value": 10.0,
"Unit": "mi",
"UnitType": 2
},
"Ceiling": {
"Value": 30000.0,
"Unit": "ft",
"UnitType": 0
},
"UVIndex": 0,
"UVIndexText": "Low",
"PrecipitationProbability": 0,
"ThunderstormProbability": 0,
"RainProbability": 0,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Rain": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Snow": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Ice": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"CloudCover": 95,
"Evapotranspiration": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"SolarIrradiance": {
"Value": 0.0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=2&lang=en-us",
"Link": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=2&lang=en-us"
},
{
"DateTime": "2024-02-17T03:00:00-06:00",
"EpochDateTime": 1708160400,
"WeatherIcon": 7,
"IconPhrase": "Cloudy",
"HasPrecipitation": false,
"IsDaylight": false,
"Temperature": {
"Value": 45.0,
"Unit": "F",
"UnitType": 18
},
"RealFeelTemperature": {
"Value": 35.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"RealFeelTemperatureShade": {
"Value": 35.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"WetBulbTemperature": {
"Value": 40.0,
"Unit": "F",
"UnitType": 18
},
"WetBulbGlobeTemperature": {
"Value": 45.0,
"Unit": "F",
"UnitType": 18
},
"DewPoint": {
"Value": 34.0,
"Unit": "F",
"UnitType": 18
},
"Wind": {
"Speed": {
"Value": 16.1,
"Unit": "mi/h",
"UnitType": 9
},
"Direction": {
"Degrees": 7,
"Localized": "N",
"English": "N"
}
},
"WindGust": {
"Speed": {
"Value": 28.8,
"Unit": "mi/h",
"UnitType": 9
}
},
"RelativeHumidity": 67,
"IndoorRelativeHumidity": 43,
"Visibility": {
"Value": 10.0,
"Unit": "mi",
"UnitType": 2
},
"Ceiling": {
"Value": 30000.0,
"Unit": "ft",
"UnitType": 0
},
"UVIndex": 0,
"UVIndexText": "Low",
"PrecipitationProbability": 0,
"ThunderstormProbability": 0,
"RainProbability": 0,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Rain": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Snow": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Ice": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"CloudCover": 95,
"Evapotranspiration": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"SolarIrradiance": {
"Value": 0.0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=3&lang=en-us",
"Link": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=3&lang=en-us"
},
{
"DateTime": "2024-02-17T04:00:00-06:00",
"EpochDateTime": 1708164000,
"WeatherIcon": 7,
"IconPhrase": "Cloudy",
"HasPrecipitation": false,
"IsDaylight": false,
"Temperature": {
"Value": 43.0,
"Unit": "F",
"UnitType": 18
},
"RealFeelTemperature": {
"Value": 33.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"RealFeelTemperatureShade": {
"Value": 33.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"WetBulbTemperature": {
"Value": 39.0,
"Unit": "F",
"UnitType": 18
},
"WetBulbGlobeTemperature": {
"Value": 43.0,
"Unit": "F",
"UnitType": 18
},
"DewPoint": {
"Value": 33.0,
"Unit": "F",
"UnitType": 18
},
"Wind": {
"Speed": {
"Value": 16.1,
"Unit": "mi/h",
"UnitType": 9
},
"Direction": {
"Degrees": 8,
"Localized": "N",
"English": "N"
}
},
"WindGust": {
"Speed": {
"Value": 27.6,
"Unit": "mi/h",
"UnitType": 9
}
},
"RelativeHumidity": 66,
"IndoorRelativeHumidity": 41,
"Visibility": {
"Value": 10.0,
"Unit": "mi",
"UnitType": 2
},
"Ceiling": {
"Value": 30000.0,
"Unit": "ft",
"UnitType": 0
},
"UVIndex": 0,
"UVIndexText": "Low",
"PrecipitationProbability": 0,
"ThunderstormProbability": 0,
"RainProbability": 0,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Rain": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Snow": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Ice": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"CloudCover": 95,
"Evapotranspiration": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"SolarIrradiance": {
"Value": 0.0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=4&lang=en-us",
"Link": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=4&lang=en-us"
},
{
"DateTime": "2024-02-17T05:00:00-06:00",
"EpochDateTime": 1708167600,
"WeatherIcon": 7,
"IconPhrase": "Cloudy",
"HasPrecipitation": false,
"IsDaylight": false,
"Temperature": {
"Value": 42.0,
"Unit": "F",
"UnitType": 18
},
"RealFeelTemperature": {
"Value": 31.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"RealFeelTemperatureShade": {
"Value": 31.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"WetBulbTemperature": {
"Value": 38.0,
"Unit": "F",
"UnitType": 18
},
"WetBulbGlobeTemperature": {
"Value": 42.0,
"Unit": "F",
"UnitType": 18
},
"DewPoint": {
"Value": 32.0,
"Unit": "F",
"UnitType": 18
},
"Wind": {
"Speed": {
"Value": 16.1,
"Unit": "mi/h",
"UnitType": 9
},
"Direction": {
"Degrees": 10,
"Localized": "N",
"English": "N"
}
},
"WindGust": {
"Speed": {
"Value": 27.6,
"Unit": "mi/h",
"UnitType": 9
}
},
"RelativeHumidity": 67,
"IndoorRelativeHumidity": 40,
"Visibility": {
"Value": 10.0,
"Unit": "mi",
"UnitType": 2
},
"Ceiling": {
"Value": 30000.0,
"Unit": "ft",
"UnitType": 0
},
"UVIndex": 0,
"UVIndexText": "Low",
"PrecipitationProbability": 0,
"ThunderstormProbability": 0,
"RainProbability": 0,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Rain": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Snow": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Ice": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"CloudCover": 95,
"Evapotranspiration": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"SolarIrradiance": {
"Value": 0.0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=5&lang=en-us",
"Link": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=5&lang=en-us"
},
{
"DateTime": "2024-02-17T06:00:00-06:00",
"EpochDateTime": 1708171200,
"WeatherIcon": 7,
"IconPhrase": "Cloudy",
"HasPrecipitation": false,
"IsDaylight": false,
"Temperature": {
"Value": 40.0,
"Unit": "F",
"UnitType": 18
},
"RealFeelTemperature": {
"Value": 29.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"RealFeelTemperatureShade": {
"Value": 29.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"WetBulbTemperature": {
"Value": 36.0,
"Unit": "F",
"UnitType": 18
},
"WetBulbGlobeTemperature": {
"Value": 40.0,
"Unit": "F",
"UnitType": 18
},
"DewPoint": {
"Value": 30.0,
"Unit": "F",
"UnitType": 18
},
"Wind": {
"Speed": {
"Value": 16.1,
"Unit": "mi/h",
"UnitType": 9
},
"Direction": {
"Degrees": 11,
"Localized": "N",
"English": "N"
}
},
"WindGust": {
"Speed": {
"Value": 26.5,
"Unit": "mi/h",
"UnitType": 9
}
},
"RelativeHumidity": 68,
"IndoorRelativeHumidity": 39,
"Visibility": {
"Value": 10.0,
"Unit": "mi",
"UnitType": 2
},
"Ceiling": {
"Value": 30000.0,
"Unit": "ft",
"UnitType": 0
},
"UVIndex": 0,
"UVIndexText": "Low",
"PrecipitationProbability": 0,
"ThunderstormProbability": 0,
"RainProbability": 0,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Rain": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Snow": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Ice": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"CloudCover": 95,
"Evapotranspiration": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"SolarIrradiance": {
"Value": 0.0,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=6&lang=en-us",
"Link": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=6&lang=en-us"
},
{
"DateTime": "2024-02-17T07:00:00-06:00",
"EpochDateTime": 1708174800,
"WeatherIcon": 35,
"IconPhrase": "Partly cloudy",
"HasPrecipitation": false,
"IsDaylight": false,
"Temperature": {
"Value": 40.0,
"Unit": "F",
"UnitType": 18
},
"RealFeelTemperature": {
"Value": 30.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"RealFeelTemperatureShade": {
"Value": 30.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"WetBulbTemperature": {
"Value": 36.0,
"Unit": "F",
"UnitType": 18
},
"WetBulbGlobeTemperature": {
"Value": 40.0,
"Unit": "F",
"UnitType": 18
},
"DewPoint": {
"Value": 30.0,
"Unit": "F",
"UnitType": 18
},
"Wind": {
"Speed": {
"Value": 15.0,
"Unit": "mi/h",
"UnitType": 9
},
"Direction": {
"Degrees": 11,
"Localized": "N",
"English": "N"
}
},
"WindGust": {
"Speed": {
"Value": 25.3,
"Unit": "mi/h",
"UnitType": 9
}
},
"RelativeHumidity": 66,
"IndoorRelativeHumidity": 38,
"Visibility": {
"Value": 10.0,
"Unit": "mi",
"UnitType": 2
},
"Ceiling": {
"Value": 28000.0,
"Unit": "ft",
"UnitType": 0
},
"UVIndex": 1,
"UVIndexText": "Low",
"PrecipitationProbability": 0,
"ThunderstormProbability": 0,
"RainProbability": 0,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Rain": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Snow": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Ice": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"CloudCover": 45,
"Evapotranspiration": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"SolarIrradiance": {
"Value": 109.6,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=7&lang=en-us",
"Link": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=7&lang=en-us"
},
{
"DateTime": "2024-02-17T08:00:00-06:00",
"EpochDateTime": 1708178400,
"WeatherIcon": 3,
"IconPhrase": "Partly sunny",
"HasPrecipitation": false,
"IsDaylight": true,
"Temperature": {
"Value": 39.0,
"Unit": "F",
"UnitType": 18
},
"RealFeelTemperature": {
"Value": 30.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"RealFeelTemperatureShade": {
"Value": 28.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"WetBulbTemperature": {
"Value": 35.0,
"Unit": "F",
"UnitType": 18
},
"WetBulbGlobeTemperature": {
"Value": 39.0,
"Unit": "F",
"UnitType": 18
},
"DewPoint": {
"Value": 29.0,
"Unit": "F",
"UnitType": 18
},
"Wind": {
"Speed": {
"Value": 15.0,
"Unit": "mi/h",
"UnitType": 9
},
"Direction": {
"Degrees": 11,
"Localized": "N",
"English": "N"
}
},
"WindGust": {
"Speed": {
"Value": 25.3,
"Unit": "mi/h",
"UnitType": 9
}
},
"RelativeHumidity": 66,
"IndoorRelativeHumidity": 38,
"Visibility": {
"Value": 10.0,
"Unit": "mi",
"UnitType": 2
},
"Ceiling": {
"Value": 30000.0,
"Unit": "ft",
"UnitType": 0
},
"UVIndex": 2,
"UVIndexText": "Low",
"PrecipitationProbability": 0,
"ThunderstormProbability": 0,
"RainProbability": 0,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Rain": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Snow": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Ice": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"CloudCover": 45,
"Evapotranspiration": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"SolarIrradiance": {
"Value": 317.8,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=8&lang=en-us",
"Link": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=8&lang=en-us"
},
{
"DateTime": "2024-02-17T09:00:00-06:00",
"EpochDateTime": 1708182000,
"WeatherIcon": 3,
"IconPhrase": "Partly sunny",
"HasPrecipitation": false,
"IsDaylight": true,
"Temperature": {
"Value": 39.0,
"Unit": "F",
"UnitType": 18
},
"RealFeelTemperature": {
"Value": 30.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"RealFeelTemperatureShade": {
"Value": 27.0,
"Unit": "F",
"UnitType": 18,
"Phrase": "Cold"
},
"WetBulbTemperature": {
"Value": 35.0,
"Unit": "F",
"UnitType": 18
},
"WetBulbGlobeTemperature": {
"Value": 39.0,
"Unit": "F",
"UnitType": 18
},
"DewPoint": {
"Value": 29.0,
"Unit": "F",
"UnitType": 18
},
"Wind": {
"Speed": {
"Value": 15.0,
"Unit": "mi/h",
"UnitType": 9
},
"Direction": {
"Degrees": 11,
"Localized": "N",
"English": "N"
}
},
"WindGust": {
"Speed": {
"Value": 25.3,
"Unit": "mi/h",
"UnitType": 9
}
},
"RelativeHumidity": 67,
"IndoorRelativeHumidity": 38,
"Visibility": {
"Value": 10.0,
"Unit": "mi",
"UnitType": 2
},
"Ceiling": {
"Value": 30000.0,
"Unit": "ft",
"UnitType": 0
},
"UVIndex": 2,
"UVIndexText": "Low",
"PrecipitationProbability": 0,
"ThunderstormProbability": 0,
"RainProbability": 0,
"SnowProbability": 0,
"IceProbability": 0,
"TotalLiquid": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Rain": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Snow": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"Ice": {
"Value": 0.0,
"Unit": "in",
"UnitType": 1
},
"CloudCover": 45,
"Evapotranspiration": {
"Value": 0.01,
"Unit": "in",
"UnitType": 1
},
"SolarIrradiance": {
"Value": 496.6,
"Unit": "W/m²",
"UnitType": 33
},
"MobileLink": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=9&lang=en-us",
"Link": "http://www.accuweather.com/en/us/austin-tx/78701/hourly-weather-forecast/34486_pc?day=2&hbhhour=9&lang=en-us"
},
]
So what I am wanting to do is to get for example the Temperature, and the attributes are hour 0, hour 1, etc.
So the parsing is not by day with the attributes being the values.
I need it that way so I can plot it on a chart as an array of temperatures over the x axis being the dates.
name: Accuweather - Detailed Hourly Forecast
resource: !secret accuweather_api
scan_interval: 3600
sensor:
- unique_id: accuweather_condition_hourly
name: Accuweather - Condition - Detailed Hourly Forecast
value_template: '{{ value_json[0].IconPhrase }}'
icon: mdi:weather-windy
attributes:
- name: 0h
value_template: '{{ value_json[0].IconPhrase }}'
- name: 1h
value_template: '{{ value_json[1].IconPhrase }}'
- name: 2h
value_template: '{{ value_json[2].IconPhrase }}'
- name: 3h
value_template: '{{ value_json[3].IconPhrase }}'
- name: 4h
value_template: '{{ value_json[4].IconPhrase }}'
- name: 5h
value_template: '{{ value_json[5].IconPhrase }}'
- name: 6h
value_template: '{{ value_json[6].IconPhrase }}'
- name: 7h
value_template: '{{ value_json[7].IconPhrase }}'
- name: 8h
value_template: '{{ value_json[8].IconPhrase }}'
- name: 9h
value_template: '{{ value_json[9].IconPhrase }}'
- name: 10h
value_template: '{{ value_json[10].IconPhrase }}'
- name: 11h
value_template: '{{ value_json[11].IconPhrase }}'
Make sense?
So you can see the attributes are the high level value_json…where x is the hour.
Any idea how to go about that? What I understoor from the docs is that I can do the json_attributes but only at a high level, so IconPhrase, RealFeelTemperature, etc.
as a reference, I am trying to adapt the code from here
1 post - 1 participant