Hey mates,
I am struggling with some basics here I believe.
I have a forecast from DWD weather.XXX and I want to show the hourly forecast in a " Lovelace Mini Graph Card" for the next 12h.
I created a template to trigger updates every hour and created a sensor, but I can not manage to connect the temperature values with the card.
TEMPLATE with SENSOR:
template:
- trigger:
- platform: time_pattern
minutes: /1
action:
- service: weather.get_forecasts
data:
type: hourly
target:
entity_id: weather.XXX
response_variable: hourly
sensor:
- name: Weather Forecast Hourly
unique_id: weather_forecast_hourly
state: "{{ now().isoformat() }}"
attributes:
forecast: "{{ hourly['weather.XXX'].forecast }}"
Card Configuration
type: custom:mini-graph-card
entity: sensor.weather_forecast_hourly
attribute: forecast.temperature
Sample sensor data “weather_forecast_hourly”:
forecast:
- datetime: '2024-04-19T18:00:00Z'
condition: pouring
wind_bearing: 289
wind_gust_speed: 37
uv_index: 1
precipitation_probability: null
temperature: 7
wind_speed: 18.5
precipitation: 0.7
- datetime: '2024-04-19T19:00:00Z'
condition: pouring
wind_bearing: 290
wind_gust_speed: 35.2
uv_index: 1
precipitation_probability: null
temperature: 7
wind_speed: 18.5
precipitation: 0.3
Any advise how to connect the sensor with the card? It feels I am missing the peace to iterate through the array.
thanks!