core: Home Connect not updating states properly

The problem

I am using core integration Home Connect with my Bosch Dryer. Issue is - when dryer goes off, so does wifi. However state of some entities remain. For instance door state, remaining program time, etc. Which makes it difficult to use states in automations. When I open Home Connect app on my android phone, it reports correctly that it could not connect to the device. Thus I would expect entities to become unavailable for instance, and not remember the last state, or time since program finished.

At this moment, dryer is turned off (wifi off), yet it shows power as “on”. In addition, entitities like “Duration” or “Program Progress” are never available.

image image

What version of Home Assistant Core has the issue?

core-2022.2.3

What was the last working version of Home Assistant Core?

N/A

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Home Connect

Link to integration documentation on our website

https://www.home-assistant.io/integrations/home_connect/

Diagnostics information

N/A

Example YAML snippet

N/A

Anything in the logs that might be useful for us?

N/A

Additional information

I would expect for these entities to be “unavailable” once appliance is turned off.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 44 (8 by maintainers)

Most upvoted comments

Unfortunately this is becoming a common theme across HA, integrations go into CORE then the original maintainers don’t have time to maintain or they no longer have the item in their homes to help update. I have two different integrations in this state currently. I am currently looking at the Home Connect integration in Node-Red now.

So what? There have already been several merged PRs by several different contributors this year as you can check here. It’s perfectly alive and well. I developed this integration in my free time, now others are improving it. That’s how open source works.

Can anyone actually look into integration and fix it, or is this thread only about summarizing issues? Basically, it is useless. I can’t build any automation based on reported states.

Same problem here for the dishwasher

The problem is broader. As I was in the middle of drying process, I restarted the HA. Most of entities went to unavailable state, despite they should reflect some state (like timer left on program). So the responsiveness is really poor. When my drying cycle is completed, I get the notification from Android Home Connect app that it is finished, but states of entities do not reflect that at all. According to the HA/Home Connect integration, it is still in progress, switch associated with “power” and drying program are still “on”, timer just switches from “XX minutes” and starts counting how much time passed since it last reported it, but program is still in “Run”. So basically any automations I tied to state (Run, Idle, …) are pointless.

Edit: Saw that essentially the same error had already been addressed in #72187.

Adding my +1 to this thread. I will, with my comparatively limited HA programming skills, try to help because I believe I have a rather minimal example to reliably recreate these errors (on HA Core 2022.6.6, Supervisor 2022.05.3, OS 8.2).

I have a Washing Machine (WAXH2KB0SN) and a Dryer (WTX8HKL9SN) by Bosch. Turning both on and then restarting HA make the Home Connect integration accurately and reliably report the state of the door on both machines. However, turning either machine off via the physical power button on the machine immediately causes the uncaught exception

2022-06-21 11:53:37 ERROR (Thread-11) [root] Uncaught thread exception Traceback (most recent call last): File “/usr/local/lib/python3.9/threading.py”, line 973, in _bootstrap_inner self.run() File “/usr/local/lib/python3.9/threading.py”, line 910, in run self._target(*self._args, **self._kwargs) File “/usr/local/lib/python3.9/site-packages/homeconnect/api.py”, line 172, in _listen self.handle_event(event, appliance) File “/usr/local/lib/python3.9/site-packages/homeconnect/api.py”, line 189, in handle_event d = self.json2dict(event_data[“items”]) KeyError: ‘items’

similar to what was reported by @HardcoreWR (although not identical). After this, the integration becomes unresponsive, and also the machine that was not turned off stops reporting updates to the state of the door.

Looks like an API issue…

Agreed, but maybe it’s the retry mechanism (if it exists at all). The last message is from 3days ago and I haven’t seen anything since then (also no updates). As if the component is stuck <somewhere> because of maybe not having a valid token or something.

Same Issue here, Home Assistant doesn’t update sensor states in realtime or not at all. iOS App works well so the API seems to be up and running but my HA Sensors are offline or reacting very slow/delayed.

Nothing in the logs unfortunately. How can I help to look deeper into the problem?