mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 23:04:03 +02:00
remove logging call and use hass.async_create_task
This commit is contained in:
parent
8ad56a3403
commit
1193f4d102
1 changed files with 1 additions and 2 deletions
|
|
@ -1299,7 +1299,6 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
service_data,
|
||||
context=data.context,
|
||||
)
|
||||
_LOGGER.debug("%s: 'light.turn_on' awaited", self._name)
|
||||
|
||||
async def execute_cancellable_adaptation_calls(
|
||||
self,
|
||||
|
|
@ -2015,7 +2014,7 @@ class AdaptiveLightingManager:
|
|||
# Don't await to avoid blocking the service call.
|
||||
# Assign to a variable only to await in tests.
|
||||
self.adaptation_tasks.add(
|
||||
asyncio.create_task(
|
||||
self.hass.async_create_task(
|
||||
switch.execute_cancellable_adaptation_calls(adaptation_data),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue