I am using the forecast from the bureau_of_meteorology integration (both daily and hourly) along with my weather station data (ecowitt 2553) to create a weather platform template.
The bom integration when calling weather.get_forecasts on it, returns the wrong key for the uv index.
The correct uv key should be uv_index as per the documentation at https://www.home-assistant.io/integrations/weather/
The response data field is a mapping of called target entities, each containing the forecast field. forecast is a list of forecasted conditions at a given point in time:
The table describes the uv index key as:
uv_index | The UV index. | 3
When using the returned forecast in a weather platform template, the forecast_hourly_template assignment will fail.
from template 'Template<template=({{ state_attr('sensor.hourly_forecasts_for_upper_brookfield','forecast') }}) renders=4>' for attribute '_forecast_hourly' in entity weather.ecowitt_weather_station validation message 'Only valid keys in Forecast are allowed, unallowed keys: ({'uv'}), see Weather documentation https://www.home-assistant.io/integrations/weather/'
A simple regular expression on the data is a work around:
forecast_hourly_template: "{{ state_attr('sensor.hourly_forecasts_for_upper_brookfield','forecast') |regex_replace(find='uv', replace='uv_index', ignorecase=False) }}"
I am using the forecast from the bureau_of_meteorology integration (both daily and hourly) along with my weather station data (ecowitt 2553) to create a weather platform template.
The bom integration when calling weather.get_forecasts on it, returns the wrong key for the uv index.
Example:
returns
weather.upper_brookfield_hourly: forecast:
The correct uv key should be uv_index as per the documentation at https://www.home-assistant.io/integrations/weather/ The response data field is a mapping of called target entities, each containing the forecast field. forecast is a list of forecasted conditions at a given point in time:
The table describes the uv index key as: uv_index | The UV index. | 3
When using the returned forecast in a weather platform template, the forecast_hourly_template assignment will fail.
from template 'Template<template=({{ state_attr('sensor.hourly_forecasts_for_upper_brookfield','forecast') }}) renders=4>' for attribute '_forecast_hourly' in entity weather.ecowitt_weather_station validation message 'Only valid keys in Forecast are allowed, unallowed keys: ({'uv'}), see Weather documentation https://www.home-assistant.io/integrations/weather/'
A simple regular expression on the data is a work around: forecast_hourly_template: "{{ state_attr('sensor.hourly_forecasts_for_upper_brookfield','forecast') |regex_replace(find='uv', replace='uv_index', ignorecase=False) }}"