Add support for Livisi PSSO, ISS and ISS2 switch devices (#89140)

This commit is contained in:
Felix Rotthowe 2023-03-05 13:36:56 +01:00 committed by GitHub
parent 3614114a8f
commit 189c612100
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -14,7 +14,7 @@ DEVICE_POLLING_DELAY: Final = 60
LIVISI_STATE_CHANGE: Final = "livisi_state_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"
MAX_TEMPERATURE: Final = 30.0

View file

@ -10,7 +10,7 @@ from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.dispatcher import async_dispatcher_connect
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 .entity import LivisiEntity
@ -30,7 +30,7 @@ async def async_setup_entry(
entities: list[SwitchEntity] = []
for device in shc_devices:
if (
device["type"] == PSS_DEVICE_TYPE
device["type"] in SWITCH_DEVICE_TYPES
and device["id"] not in coordinator.devices
):
livisi_switch: SwitchEntity = LivisiSwitch(