timmo001 / homeassistant-integration-goxlr-utility

Home Assistant Integration - GoXLR Utility
https://timmo.dev
MIT License
4 stars 2 forks source link

Handle ConnectionClosedException #17

Closed timmo001 closed 1 year ago

timmo001 commented 1 year ago

Description

Handle this

Anything in the logs or a references that might be useful?

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/goxlr_utility/light.py:204
Integration: GoXLR Utility (documentation, issues)
First occurred: 22:25:38 (1 occurrences)
Last logged: 22:25:38

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1849, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 226, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 981, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 593, in async_handle_light_off_service
    await light.async_turn_off(**filter_turn_off_params(light, params))
  File "/config/custom_components/goxlr_utility/light.py", line 204, in async_turn_off
    await self.coordinator.client.set_accent_color("000000")
  File "/usr/local/lib/python3.10/site-packages/goxlrutilityapi/websocket_client.py", line 157, in set_accent_color
    await self._send_message(
  File "/usr/local/lib/python3.10/site-packages/goxlrutilityapi/websocket_client.py", line 103, in _send_message
    raise ConnectionClosedException("Connection is closed")
goxlrutilityapi.exceptions.ConnectionClosedException: Connection is closed

Additional information

No response