Good day Cognoscenti!
I am trying to have a series of template sensors that extract the feels_like temperature from the Openweather API for each hour going forwards.
I have the Home Assistant integration of OpenWeatherMap configured for “onecall_hourly”.
When I use the following code in Developer Tools/Template:
{{ state_attr('weather.openweathermap', 'forecast') }}
I get this array of attributes starting with:
[
{
"condition": "sunny",
"precipitation_probability": 0,
"datetime": "2022-08-21T19:00:00+00:00",
"wind_bearing": 246,
"temperature": 18.2,
"wind_speed": 9.9,
"precipitation": 0
},
{
"condition": "clear-night",
"precipitation_probability": 0,
"datetime": "2022-08-21T20:00:00+00:00",
"wind_bearing": 243,
"temperature": 18.3,
"wind_speed": 7.34,
"precipitation": 0
},
This array continues for 48 hours in hourly intervals.
I can extract each hour of the required data using something like the following template sensor. This example extracts the temperature at 15.00 hours:
forecast_temp_15:
friendly_name: "Temp at 15.00"
value_template: >
{% set sensor_trigger = states('sensor.time') %}
{% set current_hr = now().strftime("%H")|int %}
{% set sensor_hr = 15 %}
{% set array_no = sensor_hr - current_hr if current_hr <= sensor_hr else 24-current_hr + sensor_hr %}
{{ state_attr('weather.openweathermap', 'forecast') [array_no] ['temperature'] }}
My question is: As there is no attribute shown for what Openweather calls “feels_like” does this mean Home Assistant does make this available? Is this attribute available in a different state?
Thank you for your help.