-
Notifications
You must be signed in to change notification settings - Fork 414
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
Replace deprecated constants to fix warnings in HA 2024.1 #1287
Conversation
For some reason, my L1 led light isn't working properly anymore with these changes. If I hit the light in HA, it will actually turn on but HA won't show the correct state (looks like it's still off). HA also can't turn it off anymore. |
Hmm, looks like that might be unrelated to my changes, as I reverted back to the latest version and that didn't change the issue. |
But
|
Yes, you are correct, I missed that. Don't know how you want to go about this? Do you want to keep supporting HA <2023.1, or is it ok to raise the minimum version to that one? After all, the constant deprecation is valid for a year (final removal in 2025.1), but it will keep filling people's logs with the warning so I would suspect a lot of issues reported. |
I've updated the PR to raise minimum version of HA to 2023.1. That's a year ago already.... |
@hmmbob Despite using the code you modified, the lights and switches still cannot synchronize status |
That is correct, those are unrelated. This is only fixing the lengthy list of warnings in your log. |
Thanks! I agree that 1 year backward is OK. Support for older versions is very time consuming. |
Backward compatibility fixes break backward compatibility :) |
@hmmbob I don't have permissions for writing to beta channel. So it's useless to ping me there :) |
Yeah, they closed the channel after the release - no one can write to it currently. I pinged you somewhat before that. But hey at least you saw the info (which I copy-pasted here earlier 😉 ) |
beta gets closed when current released is shipped, it will open with next beta. |
Thanks for the update and fix! |
Had these warnings in my logs, which are linked to changes in 2024.1 (https://developers.home-assistant.io/blog/2023/12/19/constant-deprecation/ and https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation/):
With the changes, all warnings are gone. Tested locally, runs fine. I don't have a Sonoff climate device - someone should test this.
Needs HA >2022.5 because of https://developers.home-assistant.io/blog/2022/04/02/support-constants-deprecation/ and https://developers.home-assistant.io/blog/2022/05/03/constants-deprecations/.
Should fix #1278