mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 10:47:10 +00:00
Add support for Livisi PSSO, ISS and ISS2 switch devices (#89140)
This commit is contained in:
parent
3614114a8f
commit
189c612100
@ -14,7 +14,7 @@ DEVICE_POLLING_DELAY: Final = 60
|
|||||||
LIVISI_STATE_CHANGE: Final = "livisi_state_change"
|
LIVISI_STATE_CHANGE: Final = "livisi_state_change"
|
||||||
LIVISI_REACHABILITY_CHANGE: Final = "livisi_reachability_change"
|
LIVISI_REACHABILITY_CHANGE: Final = "livisi_reachability_change"
|
||||||
|
|
||||||
PSS_DEVICE_TYPE: Final = "PSS"
|
SWITCH_DEVICE_TYPES: Final = ["ISS", "ISS2", "PSS", "PSSO"]
|
||||||
VRCC_DEVICE_TYPE: Final = "VRCC"
|
VRCC_DEVICE_TYPE: Final = "VRCC"
|
||||||
|
|
||||||
MAX_TEMPERATURE: Final = 30.0
|
MAX_TEMPERATURE: Final = 30.0
|
||||||
|
@ -10,7 +10,7 @@ from homeassistant.exceptions import HomeAssistantError
|
|||||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import DOMAIN, LIVISI_STATE_CHANGE, LOGGER, PSS_DEVICE_TYPE
|
from .const import DOMAIN, LIVISI_STATE_CHANGE, LOGGER, SWITCH_DEVICE_TYPES
|
||||||
from .coordinator import LivisiDataUpdateCoordinator
|
from .coordinator import LivisiDataUpdateCoordinator
|
||||||
from .entity import LivisiEntity
|
from .entity import LivisiEntity
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ async def async_setup_entry(
|
|||||||
entities: list[SwitchEntity] = []
|
entities: list[SwitchEntity] = []
|
||||||
for device in shc_devices:
|
for device in shc_devices:
|
||||||
if (
|
if (
|
||||||
device["type"] == PSS_DEVICE_TYPE
|
device["type"] in SWITCH_DEVICE_TYPES
|
||||||
and device["id"] not in coordinator.devices
|
and device["id"] not in coordinator.devices
|
||||||
):
|
):
|
||||||
livisi_switch: SwitchEntity = LivisiSwitch(
|
livisi_switch: SwitchEntity = LivisiSwitch(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user