ekutner / home-connect-hass

Alternative (and improved) Home Connect integration for Home Assistant
MIT License
613 stars 57 forks source link

Process Phase not updating automatically #412

Closed stefangries closed 2 weeks ago

stefangries commented 2 months ago

Describe the bug

The sensor.*****_laundrycare_common_option_processphase only updates when reloading the whole integration. Otherwise it just holds the value at the moment of the start of home assistant.

I'm using a Bosch WGB256A40 washing machine.

Version of the custom_component

1.1.7

Configuration

Set language code to "de-DE" and Entity name template to "$name".

Debug log

2024-08-30 17:24:23.473 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='KEEP-ALIVE', message='KEEP-ALIVE', data='', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:24:51.452 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='NOTIFY', message='NOTIFY', data='{"haId":"******************","items":[{"handling":"none","key":"BSH.Common.Option.ProgramProgress","level":"hint","name":"aktueller Programmfortschritt","timestamp":1725031491,"unit":"%","uri":"/api/homeappliances/******************/programs/active/options/BSH.Common.Option.ProgramProgress","value":83}]}', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:24:51.452 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.ProgramProgress = 83
2024-08-30 17:24:51.524 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='NOTIFY', message='NOTIFY', data='{"haId":"******************","items":[{"handling":"none","key":"BSH.Common.Option.RemainingProgramTime","level":"hint","name":"Verbleibende Programmlaufzeit","timestamp":1725031491,"unit":"seconds","uri":"/api/homeappliances/******************/programs/active/options/BSH.Common.Option.RemainingProgramTime","value":900},{"handling":"none","key":"BSH.Common.Option.EstimatedTotalProgramTime","level":"hint","name":"Geschätzte Gesamtprogrammlaufzeit","timestamp":1725031491,"unit":"seconds","uri":"/api/homeappliances/******************/programs/active/options/BSH.Common.Option.EstimatedTotalProgramTime","value":900}]}', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:24:51.524 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.RemainingProgramTime = 900
2024-08-30 17:24:51.525 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.EstimatedTotalProgramTime = 900
2024-08-30 17:25:18.467 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='KEEP-ALIVE', message='KEEP-ALIVE', data='', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:25:46.158 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='KEEP-ALIVE', message='KEEP-ALIVE', data='', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:25:51.461 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='NOTIFY', message='NOTIFY', data='{"haId":"******************","items":[{"handling":"none","key":"BSH.Common.Option.ProgramProgress","level":"hint","name":"aktueller Programmfortschritt","timestamp":1725031551,"unit":"%","uri":"/api/homeappliances/******************/programs/active/options/BSH.Common.Option.ProgramProgress","value":84}]}', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:25:51.461 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.ProgramProgress = 84
2024-08-30 17:25:51.592 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='NOTIFY', message='NOTIFY', data='{"haId":"******************","items":[{"handling":"none","key":"BSH.Common.Option.RemainingProgramTime","level":"hint","name":"Verbleibende Programmlaufzeit","timestamp":1725031551,"unit":"seconds","uri":"/api/homeappliances/******************/programs/active/options/BSH.Common.Option.RemainingProgramTime","value":840},{"handling":"none","key":"BSH.Common.Option.EstimatedTotalProgramTime","level":"hint","name":"Geschätzte Gesamtprogrammlaufzeit","timestamp":1725031551,"unit":"seconds","uri":"/api/homeappliances/******************/programs/active/options/BSH.Common.Option.EstimatedTotalProgramTime","value":840}]}', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:25:51.592 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.RemainingProgramTime = 840
2024-08-30 17:25:51.593 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.EstimatedTotalProgramTime = 840
2024-08-30 17:26:13.469 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='KEEP-ALIVE', message='KEEP-ALIVE', data='', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:26:51.402 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='NOTIFY', message='NOTIFY', data='{"haId":"******************","items":[{"handling":"none","key":"BSH.Common.Option.ProgramProgress","level":"hint","name":"aktueller Programmfortschritt","timestamp":1725031611,"unit":"%","uri":"/api/homeappliances/******************/programs/active/options/BSH.Common.Option.ProgramProgress","value":85}]}', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:26:51.402 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.ProgramProgress = 85
2024-08-30 17:26:51.472 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='NOTIFY', message='NOTIFY', data='{"haId":"******************","items":[{"handling":"none","key":"BSH.Common.Option.RemainingProgramTime","level":"hint","name":"Verbleibende Programmlaufzeit","timestamp":1725031611,"unit":"seconds","uri":"/api/homeappliances/******************/programs/active/options/BSH.Common.Option.RemainingProgramTime","value":780},{"handling":"none","key":"BSH.Common.Option.EstimatedTotalProgramTime","level":"hint","name":"Geschätzte Gesamtprogrammlaufzeit","timestamp":1725031611,"unit":"seconds","uri":"/api/homeappliances/******************/programs/active/options/BSH.Common.Option.EstimatedTotalProgramTime","value":780}]}', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:26:51.473 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.RemainingProgramTime = 780
2024-08-30 17:26:51.473 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.EstimatedTotalProgramTime = 780
2024-08-30 17:27:08.469 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='KEEP-ALIVE', message='KEEP-ALIVE', data='', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:27:44.274 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='NOTIFY', message='NOTIFY', data='{"haId":"******************","items":[{"handling":"none","key":"BSH.Common.Option.ProgramProgress","level":"hint","name":"aktueller Programmfortschritt","timestamp":1725031664,"unit":"%","uri":"/api/homeappliances/******************/programs/active/options/BSH.Common.Option.ProgramProgress","value":89}]}', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:27:44.274 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.ProgramProgress = 89
2024-08-30 17:27:44.357 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='NOTIFY', message='NOTIFY', data='{"haId":"******************","items":[{"handling":"none","key":"BSH.Common.Option.RemainingProgramTime","level":"hint","name":"Verbleibende Programmlaufzeit","timestamp":1725031664,"unit":"seconds","uri":"/api/homeappliances/******************/programs/active/options/BSH.Common.Option.RemainingProgramTime","value":600},{"handling":"none","key":"BSH.Common.Option.EstimatedTotalProgramTime","level":"hint","name":"Geschätzte Gesamtprogrammlaufzeit","timestamp":1725031664,"unit":"seconds","uri":"/api/homeappliances/******************/programs/active/options/BSH.Common.Option.EstimatedTotalProgramTime","value":600}]}', origin='https://api.home-connect.com', last_event_id='******************')
2024-08-30 17:27:44.357 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.RemainingProgramTime = 600
2024-08-30 17:27:44.359 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.EstimatedTotalProgramTime = 600
2024-08-30 17:28:03.468 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='KEEP-ALIVE', message='KEEP-ALIVE', data='', origin='https://api.home-connect.com', last_event_id='******************')
ekutner commented 1 month ago

The integration replies on getting updates from the API. As you can see in the log the API is sending updates for ProgramProgress and RemainingProgramTime but not for ProcessPhase. It's a problem with the HC service, you can ry reporting it to them but from past experience they are not very responsive.

stefangries commented 1 month ago

Thank you for your reply. Is there anything I can do to do a pulled update on this entity? Doing a reload on the whole integration does update the entity, but maybe there is a way to just pull an update on a specific entity on demand.

ekutner commented 1 month ago

You can press the Home Connect Refresh button that the integration creates but if you do that regularly you will definitely get blocked by the HC rate limiting mechanism, so don't try to do that with an automation.