claytonjn / hass-circadian_lighting

Circadian Lighting custom component for Home Assistant
Apache License 2.0
756 stars 89 forks source link

Incompatibility with Home Assistant 2023.6.1 #229

Closed steku closed 1 year ago

steku commented 1 year ago

Running the latest version and getting the following error when turning on the switch

Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/circadian_lighting/switch.py:377 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 1:40:56 PM (3 occurrences) Last logged: 1:57:52 PM

[108553297458000] Passing coroutines is forbidden, use tasks explicitly. Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 205, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1910, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1950, 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 811, in entity_service_call future.result() # pop exception if have ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1034, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 851, in _handle_entity_call await result File "/config/custom_components/circadian_lighting/switch.py", line 273, in async_turn_on await self._force_update_switch() File "/config/custom_components/circadian_lighting/switch.py", line 325, in _force_update_switch return await self._update_switch( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/circadian_lighting/switch.py", line 322, in _update_switch await self._adjust_lights(lights or self._lights, transition) File "/config/custom_components/circadian_lighting/switch.py", line 377, in _adjust_lights await asyncio.wait(tasks) File "/usr/local/lib/python3.11/asyncio/tasks.py", line 415, in wait raise TypeError("Passing coroutines is forbidden, use tasks explicitly.") TypeError: Passing coroutines is forbidden, use tasks explicitly.

steku commented 1 year ago

Also onces on and the updates occur, I'm getting this

`Logger: homeassistant.util.logging Source: util/logging.py:156 First occurred: 1:45:04 PM (2 occurrences) Last logged: 1:50:04 PM

Exception in _update_switch when dispatching 'circadian_lighting_update': () Traceback (most recent call last): File "/config/custom_components/circadian_lighting/switch.py", line 322, in _update_switch await self._adjust_lights(lights or self._lights, transition) File "/config/custom_components/circadian_lighting/switch.py", line 377, in _adjust_lights await asyncio.wait(tasks) File "/usr/local/lib/python3.11/asyncio/tasks.py", line 415, in wait raise TypeError("Passing coroutines is forbidden, use tasks explicitly.") TypeError: Passing coroutines is forbidden, use tasks explicitly.`

claytonjn commented 1 year ago

Closing as duplicate of https://github.com/claytonjn/hass-circadian_lighting/issues/227 - I hope to have the fix for this pushed out today.