You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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) }}"
The text was updated successfully, but these errors were encountered:
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:
data:
type: hourly
target:
entity_id: weather.upper_brookfield_hourly
response_variable: ub_hourly
sensor:
unique_id: ub_hourly_forecast
state: "{{ now().isoformat() }}"
attributes:
forecast: "{{ ub_hourly['weather.upper_brookfield_hourly'].forecast }}"
returns
weather.upper_brookfield_hourly:
forecast:
- datetime: "2024-04-08T22:00:00+10:00"
condition: sunny
precipitation_probability: 5
wind_bearing: "N"
wind_gust_speed: 15
uv: 0
temperature: 20
wind_speed: 7
precipitation: 0
humidity: 82
...
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) }}"
The text was updated successfully, but these errors were encountered: