mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Changes due to manifest.json. Awaiting coroutines instead of creating tasks (#23321)
This commit is contained in:
committed by
Paulus Schoutsen
parent
aa26f90420
commit
662375bdd7
@@ -1,4 +1,6 @@
|
||||
"""Support for LCN lights."""
|
||||
import pypck
|
||||
|
||||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS, ATTR_TRANSITION, SUPPORT_BRIGHTNESS, SUPPORT_TRANSITION,
|
||||
Light)
|
||||
@@ -16,8 +18,6 @@ async def async_setup_platform(
|
||||
if discovery_info is None:
|
||||
return
|
||||
|
||||
import pypck
|
||||
|
||||
devices = []
|
||||
for config in discovery_info:
|
||||
address, connection_id = config[CONF_ADDRESS]
|
||||
@@ -56,9 +56,8 @@ class LcnOutputLight(LcnDevice, Light):
|
||||
async def async_added_to_hass(self):
|
||||
"""Run when entity about to be added to hass."""
|
||||
await super().async_added_to_hass()
|
||||
self.hass.async_create_task(
|
||||
self.address_connection.activate_status_request_handler(
|
||||
self.output))
|
||||
await self.address_connection.activate_status_request_handler(
|
||||
self.output)
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
@@ -138,9 +137,8 @@ class LcnRelayLight(LcnDevice, Light):
|
||||
async def async_added_to_hass(self):
|
||||
"""Run when entity about to be added to hass."""
|
||||
await super().async_added_to_hass()
|
||||
self.hass.async_create_task(
|
||||
self.address_connection.activate_status_request_handler(
|
||||
self.output))
|
||||
await self.address_connection.activate_status_request_handler(
|
||||
self.output)
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
|
||||
Reference in New Issue
Block a user