bieniu / accuweather

Python wrapper for getting weather data from AccuWeather servers for Limited Trial package.
Apache License 2.0
19 stars 7 forks source link

Icon name for weather forcast change? #373

Closed trombonekenny closed 4 months ago

trombonekenny commented 4 months ago

Hi Maciej,

Thanks for your work with HA and Accuweather. I have been using it to control a color bulb based on the icon name for the forecast. In the 2024.3 branch, sensor.accuweatherhome_condition_0d was working. Now in 2024.5, that sensor seems to have gone away.

sensor.accuweatherhome_condition_day_0d has the text description for the day (example "Times of clouds and sun with a thunderstorm around; can be strong early; windy and warm; storms can bring flash flooding, damaging winds and even a tornado" but not the short text that used to say "pouring".

I noticed weather.accuweatherHome's state has "pouring" but that's current state, not forecast for the day. Did that go away?

I can view the weather entity in HA and see icons: image

But I'm not sure where to tie into that data for a python_script. Any advice? TIA.

trombonekenny commented 4 months ago

Was that DailyForecasts.Day.IconPhrase from https://developer.accuweather.com/accuweather-forecast-api/apis/get/forecasts/v1/daily/5day/%7BlocationKey%7D ?

trombonekenny commented 4 months ago

Ah, I think I figured it out. Sorry for the false alarm. Previously, I was using a template sensor (old format) to grab the attribute out of weather.accuweatherhome with something like:

value_template: >-
  {{ state_attr('weather.accuweatherhome', 'forecast')[0].condition }}

I had to move that over to a service template with weather.get_forecasts and then get all the entities and triggers adjusted.

bieniu commented 4 months ago

Hi. Exactly as you wrote, you need to use the weather.get_forecasts service.

obraz