Closed Ayuus closed 7 months ago
The error message is a bit confusing, but this actually doesn't have anything to do with this integration - it means that you have an automation or a script that's calling weather.get_forecast
, and that automation/script needs to be updated to use weather.get_forecasts
instead. Unfortunately Home Assistant started displaying this error before they finished writing the documentation about the change, but you can view the pending documentation here:
https://github.com/home-assistant/home-assistant.io/pull/30189/files
For everyone who struggles with weather.get_forcasts as I did, this is what is working for me:
template:
# daily forcast data, trigger sensor is necessary for new HA
- trigger:
- platform: state
entity_id: weather.home
action:
service: weather.get_forecasts
target:
entity_id: weather.home
data:
type: daily
response_variable: daily
sensor:
- name: "Daily Weather Forecast"
unique_id: daily_weather_forecast
state: "{{ now().isoformat() }}"
attributes:
forecast: "{{ daily['weather.home'].forecast}}"
# hourly forcast data, trigger sensor is necessary for new HA
- trigger:
- platform: time_pattern
hours: /1
action:
service: weather.get_forecasts
target:
entity_id: weather.home
data:
type: hourly
response_variable: hourly
sensor:
- name: "Hourly Weather Forecast"
unique_id: hourly_weather_forecast
state: "{{ now().isoformat() }}"
attributes:
forecast: "{{ hourly['weather.home'].forecast}}"
Hello,
Since I updated HA to 2023.12, I get the following message:
Woul it be possible to adapt his integration to use the new HA service?
Regards, Ronald