Fix dangling task for plum_lightpad (#88295)
This commit is contained in:
parent
0a363fa004
commit
99c904ea5d
1 changed files with 4 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue