Title: Slow startup (5min websocket timeout) + TypeError in switch.py:474 with HA 2026.04 · Issue #28 · Connectlife-LLC/HomeAssistantPlugin · GitHub
Open Graph Title: Slow startup (5min websocket timeout) + TypeError in switch.py:474 with HA 2026.04 · Issue #28 · Connectlife-LLC/HomeAssistantPlugin
X Title: Slow startup (5min websocket timeout) + TypeError in switch.py:474 with HA 2026.04 · Issue #28 · Connectlife-LLC/HomeAssistantPlugin
Description: Environment Home Assistant version: 2026.04 Integration version: v1.0.0 (via HACS) Python version: 3.14 Hardware: Raspberry Pi (Home Assistant OS) Devices: 5x Hisense split AC (model 009-199), managed via ConnectLife Bug 1: Websocket blo...
Open Graph Description: Environment Home Assistant version: 2026.04 Integration version: v1.0.0 (via HACS) Python version: 3.14 Hardware: Raspberry Pi (Home Assistant OS) Devices: 5x Hisense split AC (model 009-199), mana...
X Description: Environment Home Assistant version: 2026.04 Integration version: v1.0.0 (via HACS) Python version: 3.14 Hardware: Raspberry Pi (Home Assistant OS) Devices: 5x Hisense split AC (model 009-199), mana...
Opengraph URL: https://github.com/Connectlife-LLC/HomeAssistantPlugin/issues/28
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Slow startup (5min websocket timeout) + TypeError in switch.py:474 with HA 2026.04","articleBody":"### Environment\n- **Home Assistant version:** 2026.04\n- **Integration version:** v1.0.0 (via HACS)\n- **Python version:** 3.14\n- **Hardware:** Raspberry Pi (Home Assistant OS)\n- **Devices:** 5x Hisense split AC (model 009-199), managed via ConnectLife\n\n### Bug 1: Websocket blocks HA startup for 5 minutes\n\nDuring Home Assistant startup, `HisenseWebSocket._connect_ws()` hangs and causes a 5-minute \ntimeout before HA can proceed. This blocks ALL other integrations from completing setup.\n\n**Log:**\n2026-04-06 18:50:39.442 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for\nbootstrap waiting on {\u003cTask pending name='Task-604'\ncoro=\u003cHisenseWebSocket._connect_ws() running at\n/config/custom_components/hisense_ac_plugin/websocket.py:119\u003e\nwait_for=\u003cFuture pending cb=[Task.task_wakeup()]\u003e cb=[set.remove()]\u003e} - moving forward\n\n**Expected behavior:** The websocket connection should either complete quickly or fail gracefully \nwithout blocking HA startup. Consider using `hass.async_create_background_task()` instead of \nblocking the setup phase.\n\n### Bug 2: TypeError in switch.py line 474 (15 occurrences per boot)\n\nAfter startup, multiple `TypeError: 'NoneType' object can't be awaited` errors are logged \nfrom `switch.py:474`. With 5 AC units × 3 switches each, this generates 15 errors per boot.\n\n**Log:**\n2026-04-06 18:45:21.509 ERROR (SyncWorker_5) [homeassistant] Error doing job:\nTask exception was never retrieved (task: None)\nTraceback (most recent call last):\nFile \"/config/custom_components/hisense_ac_plugin/switch.py\", line 474, in _async_schedule_update\nawait self.async_schedule_update_ha_state(True)\nTypeError: 'NoneType' object can't be awaited\n\n**Expected behavior:** `_async_schedule_update` should check if `async_schedule_update_ha_state` \nreturns a valid awaitable before awaiting it, or handle the None case gracefully.\n\n### Additional warnings (non-blocking)\n\nThe integration also logs these warnings for each device, which is expected behavior \nbut worth noting:\nWARNING [custom_components.hisense_ac_plugin.number] No supported numbers found\nWARNING [custom_components.hisense_ac_plugin.water_heater] Skipping unsupported device: 009-199 (...)\nWARNING [custom_components.hisense_ac_plugin.humidifier] Skipping unsupported device: 009-199 (...)\n\nThese are just informational (009-199 are AC units, not water heaters/humidifiers), but could \nbe silenced to keep logs clean.","author":{"url":"https://github.com/pifma","@type":"Person","name":"pifma"},"datePublished":"2026-04-06T17:35:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/28/HomeAssistantPlugin/issues/28"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:77298dcf-8dc2-7171-c25c-b0a36d6616c6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AF02:29866E:6551AC:8E6C86:6A4BCEB0 |
| html-safe-nonce | 9fcc7f0c8cde7c4118eeef74ca7a7ba2af4295cd523578d78c659a00ea02240f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjAyOjI5ODY2RTo2NTUxQUM6OEU2Qzg2OjZBNEJDRUIwIiwidmlzaXRvcl9pZCI6IjIwODE2Njc3ODU2ODc4MTM4MDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 445a72c83183879731333b69e96fc47b86fa59a479c70522a54d95cafaa7ee38 |
| hovercard-subject-tag | issue:4213091341 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Connectlife-LLC/HomeAssistantPlugin/28/issue_layout |
| twitter:image | https://opengraph.githubassets.com/eafd14758f23cd06416e11c5069ec9ee071f02ac0a4263d8e45662ff27d7bed8/Connectlife-LLC/HomeAssistantPlugin/issues/28 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/eafd14758f23cd06416e11c5069ec9ee071f02ac0a4263d8e45662ff27d7bed8/Connectlife-LLC/HomeAssistantPlugin/issues/28 |
| og:image:alt | Environment Home Assistant version: 2026.04 Integration version: v1.0.0 (via HACS) Python version: 3.14 Hardware: Raspberry Pi (Home Assistant OS) Devices: 5x Hisense split AC (model 009-199), mana... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pifma |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9df996be9551ac02247d09a2f7f64ece66c35ca28885d346e98fdfda9cdaa37b |
| turbo-cache-control | no-preview |
| go-import | github.com/Connectlife-LLC/HomeAssistantPlugin git https://github.com/Connectlife-LLC/HomeAssistantPlugin.git |
| octolytics-dimension-user_id | 189089286 |
| octolytics-dimension-user_login | Connectlife-LLC |
| octolytics-dimension-repository_id | 999409885 |
| octolytics-dimension-repository_nwo | Connectlife-LLC/HomeAssistantPlugin |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 999409885 |
| octolytics-dimension-repository_network_root_nwo | Connectlife-LLC/HomeAssistantPlugin |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b71208a1c9ec7ccf364087569d0551f665dda674 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width