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

Refactor weather to address forecast deprecation #193

Merged
merged 1 commit into from
Sep 17, 2023

Conversation

evilmarty
Copy link
Contributor

What it says on the tin. Home Assistant will be deprecating the forecast and attr_forecast weather entity properties in favour of using async_forecast_daily and async_forecast_hourly etc.

I have tried to keep the change to a minimum so not to break any existing integrations but, due to the nature of the entity change, will require a design rethink on the internals. One could argue the collector is no longer required along with the sensors, as they can be derived by templates. It's a bigger discussion to be had but at the very least this integration won't languish during that time.

This addresses issue #189.

@politas
Copy link

politas commented Sep 17, 2023

Would it not be better to first add the new functionality, and remove the deprecated properties later? You seem to be removing forecast immediately.

@evilmarty
Copy link
Contributor Author

@politas what reason would keeping them serve? The functionality already exists and 'WeatherHourly' will likely be removed.

@Makin-Things
Copy link
Collaborator

@evilmarty thanks for working on this. I will have a look and merge later on today and create a beta release for others to test. I suspect it will also cause major problems with custom weather cards.
I will make it only installable if you have HA 2023.9.0 or newer to avoid it breaking previous HA versions.

@Makin-Things Makin-Things merged commit 3680d41 into bremor:main Sep 17, 2023
@Makin-Things
Copy link
Collaborator

@evilmarty I have merged this and created a pre-release (1.2.0).
We should keep the additional sensor entities as removing them will result in breaking changes in some cards (ie. the Platinum Weather Card) as they use the entities in preference to the weather attributes. The HA guys really don't have a clue about how to deal with weather stuff and they refuse to listen to common sense.

@evilmarty evilmarty mentioned this pull request Dec 22, 2023
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

Successfully merging this pull request may close these issues.

3 participants