Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weather on screensaver tries to read the 'forecast' attribute on weather entities, which has been removed from HA recently. #8

Open
CultusMechanicus opened this issue Apr 23, 2024 · 3 comments

Comments

@CultusMechanicus
Copy link

Not really an issue, but you need to point the screensaver weather at a template sensor like the one below as HA 2024.04 removed the 'forecast' attribute out to a service call for some random reason...

template:
  - trigger:
      - platform: time_pattern
        hours: /1
      - platform: homeassistant
        event: start
    action:
      - service: weather.get_forecasts
        data:
          type: daily
        target:
          entity_id: weather.home # change to your weather entity
        response_variable: daily
    sensor:
      - name: Weather Forecast Daily
        unique_id: weather_forecast_daily
        state: "{{ states('weather.home') }}" # # change to your weather entity in this line
        attributes:
          temperature: "{{ state_attr('weather.home', 'temperature') }}" # change to your weather entity
          temperature_unit: "{{ state_attr('weather.home', 'temperature_unit') }}" # change to your weather entity
          forecast: "{{ daily['weather.home'].forecast }}" # change to your weather entity
@olicooper
Copy link
Owner

Interesting! This change shouldn't be too hard to make, but I will lose the automatic status updates so I might have to poll the service instead now. I am on HA v4.3 so that explains why I haven't spotted this yet. Thankfully the weather service is already included in v4.3.

@CultusMechanicus
Copy link
Author

Yeah, I don't quite get the reasoning they had when they moved it from an attribute on weather entities to a service call, it broke a lot of things.

@olicooper
Copy link
Owner

Unfortunately esphome does not support service calls with response data so I have submitted a feature request esphome/feature-requests#2703

olicooper added a commit that referenced this issue Apr 27, 2024
This is in relation to the recent HA changes to weather forcasts and is made in anticipation of additional changes requred to support the new functionality. Related to issue #8
olicooper added a commit that referenced this issue Apr 27, 2024
olicooper added a commit that referenced this issue Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants