mirror of
https://github.com/home-assistant/core.git
synced 2025-06-05 05:37:04 +00:00
Fix dangling task for plum_lightpad (#88295)
This commit is contained in:
parent
0a363fa004
commit
99c904ea5d
@ -1,7 +1,6 @@
|
||||
"""Support for Plum Lightpad lights."""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from typing import Any
|
||||
|
||||
from plumlightpad import Plum
|
||||
@ -51,13 +50,15 @@ async def async_setup_entry(
|
||||
setup_entities(device)
|
||||
|
||||
device_web_session = async_get_clientsession(hass, verify_ssl=False)
|
||||
asyncio.create_task(
|
||||
entry.async_create_background_task(
|
||||
hass,
|
||||
plum.discover(
|
||||
hass.loop,
|
||||
loadListener=new_load,
|
||||
lightpadListener=new_lightpad,
|
||||
websession=device_web_session,
|
||||
)
|
||||
),
|
||||
"plum.light-discover",
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user