Compare commits

..

3 Commits

Author SHA1 Message Date
Andrey
768d46d952 hotfix 2021-01-14 22:48:07 +03:00
Andrey
359c6b99b7 hotfix 2021-01-14 22:27:07 +03:00
Andrey
79dc46226a hotfix 2021-01-14 22:19:56 +03:00
4 changed files with 12 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
"""Platform for light integration."""
import logging
import asyncio
import voluptuous as vol
@@ -69,7 +70,8 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
async_add_devices(devices)
await scan()
asyncio.create_task(scan())
class MegaBinarySensor(BinarySensorEntity, BaseMegaEntity):

View File

@@ -268,7 +268,6 @@ class MegaD:
return pty, m
async def scan_ports(self,):
async with self.lck:
for x in range(38):
ret = await self.scan_port(x)
if ret:

View File

@@ -1,6 +1,6 @@
"""Platform for light integration."""
import logging
import asyncio
import voluptuous as vol
from homeassistant.components.light import (
@@ -85,7 +85,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
devices.append(light)
async_add_devices(devices)
await scan_ports()
asyncio.create_task(scan_ports())
class MegaLight(LightEntity, BaseMegaEntity):

View File

@@ -1,4 +1,5 @@
"""Platform for light integration."""
import asyncio
import logging
import voluptuous as vol
@@ -111,7 +112,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
async_add_devices(devices)
await scan()
asyncio.create_task(scan())
class Mega1WSensor(BaseMegaEntity):