SweVictor / v-weather-card

Weather Card with animated icons for Home Assistant Lovelace
https://github.com/SweVictor/v-weather-card
MIT License
0 stars 0 forks source link

Hourly forecasts: mismatch between real entity and entity to configure in v-weather-card? #1

Open ksmolder opened 1 year ago

ksmolder commented 1 year ago

Checklist:

Release with the issue:

Last working release (if known):

Browser and Operating System:

Description of problem:

Context

[!Note] I first created the subscription to the hourly forecast. Next, I added a second integration using the daily forecast. The latter was originally named entity.openweathermap_2, but I renamed it to entity.openweathermap_daily (and all of its sensors).

Issue

Additional information: Looking at the code, I suspect line 321 in card.ts to be the source of the issue. It seems when hourly_forecast is enabled, the suffix _hourly is appended to the entity's name. In reality, this entity does not need to have that name. You just need to know you configured an entity to fetch hourly predictions. SO my guess is that you don't need to append anything to the entity's name. A user just need to make sure that the correct entity is used when suggesting it provides hourly forecasts.

ksmolder commented 1 year ago

Tried to dig a bit deeper into the issue by creating an entity weather.openweathermap for the daily forecasts and one named weather.openweathermap_hourly for the hourly forecasts. Assumed that pointing v-weather-card to the one without the _hourly suffix would make the card behave as intended when hourly_forecast is enabled. Didn't do the trick however... So, not sure if the above assessment makes any sense...