mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-11 00:54:28 +05:00
hotfix
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"""Platform for light integration."""
|
||||
import logging
|
||||
import asyncio
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
@@ -69,7 +70,7 @@ 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):
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user