-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix issues with sensors not updating after HA 2024.1 upgrade #37
Conversation
…when assigned a new value, not as a property. Per discussion: home-assistant/core#107608
…units and invalid combinations of device and state classes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @shortbloke, including all the fixed deprecation warnings. The funny thing is on my side I can't test it right now because my NAS' docker infra (where I deployed HA) needs some care... Anyway, code-wise it all looks fine as per the suggestion we got.
Therefore I think you can close home-assistant/core#107608 and I can merge this one ;) apart a mini-comment I'd add for the story
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just leaving some unasked review :)
I patched and can confirm all is working well As can be seen below - it didn't ultimately work - I should have given it longer for the app to settle in :-) |
Thanks for the review @joostlek ! And as you now learned about this integration, I dare asking you a suggestion and/or some pointers about a different issue, which is essentially the only reason why I never pushed this to be part of HA core: any idea how to make an async UDP listening loop in the context of HomeAssistant? |
Let's chat on discord :) |
HA 2024.1.3 caused sensor to break again. This time when trying to set then name attribute. Updated to set _attr_name directly during creation of sensor entity.
This is to be consistent with recent changes for name and state.
@shortbloke all good to merge? |
@glpatcern Yep, good to go AFAIK ;-) |
I’m new to all this, but I see you’ve merged some new files into the owl custom setup. Does that mean I will need to re run the terminal script on the customisation page in order to get the new stuff installed? |
@orandaadnaro Assuming you installed this custom component via HACS, the update will be offered there. You might need to restart the HACS addon or HA in order to get to check for updates. |
Thanks that update worked as you described - never seen that before - quite a surprise! Will future updates come this way? |
@orandaadnaro That's how updates to all HACS components should be delivered. So yes. |
Fixed #36 - State is directly updated via self._attr_native_value
Address deprecation warnings with specific device and state class combinations used in
SENSOR_TYPES
definitions.Use new unit enumerators, replacing deprecated constants, per: Constant Deprecation