core: LG WebOS TV integration fails to setup on HA restart

The problem

On one of my 3 LG TVs the integration fails on HA restart and will also not reload until I turn the TV on. Once it’s loaded it works normally, I can turn the TV off and the integration will turn it on (via wol), etc. This is new to 2025.2, I did not see this behavior in 2025.1.x

What version of Home Assistant Core has the issue?

core-2025.2.1

What was the last working version of Home Assistant Core?

core-2025.1.x

What type of installation are you running?

Home Assistant OS

Integration causing the issue

LG webOS TV

Link to integration documentation on our website

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

Diagnostics information

home-assistant_webostv_2025-02-07T20-30-44.473Z.log

Example YAML snippet


Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: config_entries.py:637
First occurred: 2:22:34 PM (2 occurrences)
Last logged: 2:24:37 PM

Error setting up entry Office TV for webostv
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 637, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/webostv/__init__.py", line 53, in async_setup_entry
    await client.connect()
  File "/usr/local/lib/python3.13/site-packages/aiowebostv/webos_client.py", line 92, in connect
    return await self.connect_result
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiowebostv/webos_client.py", line 322, in connect_handler
    await self._get_hello_info(main_ws)
  File "/usr/local/lib/python3.13/site-packages/aiowebostv/webos_client.py", line 162, in _get_hello_info
    response = await ws.receive_json()
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_ws.py", line 405, in receive_json
    data = await self.receive_str(timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_ws.py", line 386, in receive_str
    raise WSMessageTypeError(
        f"Received message {msg.type}:{msg.data!r} is not WSMsgType.TEXT"
    )
aiohttp.client_exceptions.WSMessageTypeError: Received message 8:1008 is not WSMsgType.TEXT

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 15 (7 by maintainers)

Most upvoted comments

@vcdx71 can you test if https://github.com/home-assistant/core/pull/137870 fix the issue for you, the easiest way to run the fix as a custom integration:

  1. From a terminal shell into the core container (you can use the Terminal & SSH or the Advanced SSH & Web Terminal addons):
docker exec -it homeassistant /bin/bash
  1. Clone the fix PR:
cd /config
curl -o- -sSL https://gist.githubusercontent.com/thecode/2f725a121fb71840d8a245381fab9a4f/raw/core_integration_pr | bash /dev/stdin -d webostv -p 137870
  1. Restart Home Assistant (easiest way, on the dashboard type c, s and select “Restart Server”)

Once you have restarted Home Assistant try to reproduce and report back, to remove the custom integration you need to delete it from the /config/custom_components/webostv folder and restart Home Assistant

Thanks!

@vcdx71 can you test if #137870 fix the issue for you, the easiest way to run the fix as a custom integration:

  1. From a terminal shell into the core container (you can use the Terminal & SSH or the Advanced SSH & Web Terminal addons):

docker exec -it homeassistant /bin/bash 2. Clone the fix PR:

cd /config curl -o- -sSL https://gist.githubusercontent.com/thecode/2f725a121fb71840d8a245381fab9a4f/raw/core_integration_pr | bash /dev/stdin -d webostv -p 137870 3. Restart Home Assistant (easiest way, on the dashboard type c, s and select “Restart Server”)

Once you have restarted Home Assistant try to reproduce and report back, to remove the custom integration you need to delete it from the /config/custom_components/webostv folder and restart Home Assistant

Thanks!

This fixed it, thanks!

@danielgoepp you can validate the fix (which is planned for the next release) follow the steps at #137747 (comment)

Yup, that works! Thanks. I’ll leave this custom component in until the next release.

@danielgoepp you can validate the fix (which is planned for the next release) follow the steps at https://github.com/home-assistant/core/issues/137747#issuecomment-2645806108

I can give it a go tomorrow, maybe late this evening. I’ll let you know.

@vcdx71 can you test if https://github.com/home-assistant/core/pull/137870 fix the issue for you, the easiest way to run the fix as a custom integration:

Thanks for the PR! I had the exact same issue as reported, and for me this seems to fix it 👍

Nvm, I just realized that the only thing fixed on my side is the install itself. I am away from home today, but if no one provides you logs until tomorrow then I can.