-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Disable Home Connect appliance refresh when frequent disconnects are detected #142615
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
Disable Home Connect appliance refresh when frequent disconnects are detected #142615
Conversation
Hey there @DavidMStraub, @MartinHjelmare, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
i don't undertand why test are failing. test seems to be broken. |
Seems like an issue related to Python
If you have class AEnumClass(StrEnum):
@classmethod
def _missing_(cls, value: object) -> "AEnumClass":
"""Return UNKNOWN for missing keys."""
return cls.UNKNOWN
UNKNOWN = "unknown"
VALUE_1 = "value_1"
VALUE_2 = "value_2"
But it you don't have it defined class AEnumClass(StrEnum):
VALUE_1 = "value_1"
VALUE_2 = "value_2"
|
@Diegorro98 OK, that's an interesting theory for the failing tests. But I don't think the tests are always failing, they seem to pass sometimes. Does the Edit: CPython 3.13.3 has this enum issue fixed, python/cpython#131045 this is the 3.13 PR: python/cpython#131167 |
I can confirm that reverting the change in |
Changing the enum check like this makes it work again with Python 3.13.3: diff --git a/homeassistant/components/home_connect/coordinator.py b/homeassistant/components/home_connect/coordinator.py
index fb86bb2edc6..b30f60aea6b 100644
--- a/homeassistant/components/home_connect/coordinator.py
+++ b/homeassistant/components/home_connect/coordinator.py
@@ -208,7 +208,7 @@ class HomeConnectCoordinator(
events = self.data[event_message_ha_id].events
for event in event_message.data.items:
event_key = event.key
- if event_key in SettingKey:
+ if event_key in SettingKey.__members__:
setting_key = SettingKey(event_key)
if setting_key in settings:
settings[setting_key].value = event.value |
Should be fixed now with #142666 merged. |
Moving to draft as I'm not able to see the message description at the UI |
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Co-authored-by: Martin Hjelmare <[email protected]>
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!
Proposed change
Some users face an issue where the appliance is reportedly to be connected repeatedly until the API rate limit hits.
This PR tries to avoid that by disabling the appliance refresh and creating an issue that the user can confirm to re-enable the refresh.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: