mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 19:09:32 +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 sensors."""
|
||||
import pypck
|
||||
|
||||
from homeassistant.const import CONF_ADDRESS, CONF_UNIT_OF_MEASUREMENT
|
||||
|
||||
from . import LcnDevice, get_connection
|
||||
@@ -13,8 +15,6 @@ async def async_setup_platform(hass, hass_config, async_add_entities,
|
||||
if discovery_info is None:
|
||||
return
|
||||
|
||||
import pypck
|
||||
|
||||
devices = []
|
||||
for config in discovery_info:
|
||||
address, connection_id = config[CONF_ADDRESS]
|
||||
@@ -50,9 +50,8 @@ class LcnVariableSensor(LcnDevice):
|
||||
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.variable))
|
||||
await self.address_connection.activate_status_request_handler(
|
||||
self.variable)
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
@@ -91,9 +90,8 @@ class LcnLedLogicSensor(LcnDevice):
|
||||
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.source))
|
||||
await self.address_connection.activate_status_request_handler(
|
||||
self.source)
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
|
||||
Reference in New Issue
Block a user