mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-11 17:14:28 +05:00
hotfix
This commit is contained in:
@@ -70,7 +70,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
|
|||||||
|
|
||||||
async_add_devices(devices)
|
async_add_devices(devices)
|
||||||
|
|
||||||
asyncio.create_task(scan())
|
hass.async_create_task(scan())
|
||||||
|
|
||||||
class MegaBinarySensor(BinarySensorEntity, BaseMegaEntity):
|
class MegaBinarySensor(BinarySensorEntity, BaseMegaEntity):
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
|
|||||||
devices.append(light)
|
devices.append(light)
|
||||||
async_add_devices(devices)
|
async_add_devices(devices)
|
||||||
|
|
||||||
asyncio.create_task(scan_ports())
|
hass.async_create_task(scan_ports())
|
||||||
|
|
||||||
|
|
||||||
class MegaLight(LightEntity, BaseMegaEntity):
|
class MegaLight(LightEntity, BaseMegaEntity):
|
||||||
|
|||||||
@@ -112,7 +112,8 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
|
|||||||
|
|
||||||
async_add_devices(devices)
|
async_add_devices(devices)
|
||||||
|
|
||||||
asyncio.create_task(scan())
|
hass.async_create_task(scan())
|
||||||
|
|
||||||
|
|
||||||
class Mega1WSensor(BaseMegaEntity):
|
class Mega1WSensor(BaseMegaEntity):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user