Closed ars4l4n closed 2 months ago
Is there any value after some time?
I assume your template is missing some key for the weather_data
response variable.
Example from weather integration documentation.
template:
- trigger:
- platform: time_pattern
hours: /1
action:
- action: weather.get_forecasts
data:
type: hourly
target:
entity_id: weather.home
response_variable: hourly
sensor:
- name: Temperature forecast next hour
unique_id: temperature_forecast_next_hour
state: "{{ hourly['weather.home'].forecast[0].temperature }}"
unit_of_measurement: °C
I assume you need something like
{{ weather_data['weather.bad_homburg_wetterstation'].forecast[0].temperature }}
Is there any value after some time?
no
I assume your template is missing some key for the
weather_data
response variable.
what key though?
I assume you need something like {{ weather_data['weather.bad_homburg_wetterstation'].forecast[0].temperature }}
I put this as the state and the sensor still reports unknown, even after 1 day.
@ars4l4n I've found two errors in your configuration. I marked them in bold:
template:
The first was missing an 's' and the second was missing the key of the weather station. With this everything should work as expected.
@ars4l4n Were you able to resolve your issue?
I'll close this for now. Feel free to reopen if you still need assistance.
Version of home_assistant
Core 2024.7.2 Supervisor 2024.08.0 Operating System 12.4
Version of the custom_component
2.1.4
Describe the bug
This is the template I'm using under configuration.yaml:
I restarted HA which should've triggered the sensor, but there's no value.
Debug log
right after restart: https://pastebin.com/01zJMKYq