I have used an integration to get weather forecast data from Finnish Meteorology Institute (FMI). I have the following value template in my configuration.yaml, which combines data for four following forecasts into a text sensor, which is then read by ESPHome, split apart and presented on a ePaper display. It is working ok.
# FMI, forecast data
- platform: template
sensors:
fmi_forecast:
friendly_name: FMI forecast for four items
# entity_id: sensor.fmi_forecast
value_template: >-
{%- for i in [ 0, 1, 2, 3] -%}
{{- state_attr('weather.hakametsa', 'forecast')[i].datetime.hour -}};
{{- state_attr('weather.hakametsa', 'forecast')[i].temperature -}};
{{- state_attr('weather.hakametsa', 'forecast')[i].condition -}};
{{- state_attr('weather.hakametsa', 'forecast')[i].precipitation -}};
{%- endfor %}
But, FMI weather data does not contain wind chill factor values, which would be a very nice plus.
I’ve found a thread, where a formula for calculating wind chill factor is presented, but don’t understand how to include it to value template I have.
What I seem to read is that you look are 4 values (3 ahead), not sure if date or hour but that should not matter. So for each you need the windchil as well and thus for each i you need to use the hakametsa values into the windchill calc.
Something like
As your current template does not show the wind, I guessed it is there as a attrib…as suggested above
Tip (if not already known), test it out in Developer>Templates