1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

YoLink remove unsupported remoters (#154918)

This commit is contained in:
Matrix
2025-10-21 16:18:18 +08:00
committed by Franck Nijhof
parent 244b6437b2
commit f6ac23cc58
2 changed files with 13 additions and 1 deletions

View File

@@ -26,7 +26,7 @@ from homeassistant.helpers import (
from homeassistant.helpers.typing import ConfigType
from . import api
from .const import ATTR_LORA_INFO, DOMAIN, YOLINK_EVENT
from .const import ATTR_LORA_INFO, DOMAIN, SUPPORTED_REMOTERS, YOLINK_EVENT
from .coordinator import YoLinkCoordinator
from .device_trigger import CONF_LONG_PRESS, CONF_SHORT_PRESS
from .services import async_setup_services
@@ -151,6 +151,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
device_pairing_mapping[parent_id] = device.device_id
for device in yolink_home.get_devices():
if (
device.device_type == ATTR_DEVICE_SMART_REMOTER
and device.device_model_name not in SUPPORTED_REMOTERS
):
continue
paried_device: YoLinkDevice | None = None
if (
paried_device_id := device_pairing_mapping.get(device.device_id)

View File

@@ -44,3 +44,10 @@ DEV_MODEL_LEAK_STOP_YS5009 = "YS5009"
DEV_MODEL_LEAK_STOP_YS5029 = "YS5029"
DEV_MODEL_WATER_METER_YS5018_EC = "YS5018-EC"
DEV_MODEL_WATER_METER_YS5018_UC = "YS5018-UC"
SUPPORTED_REMOTERS = [
DEV_MODEL_FLEX_FOB_YS3604_EC,
DEV_MODEL_FLEX_FOB_YS3604_UC,
DEV_MODEL_FLEX_FOB_YS3614_EC,
DEV_MODEL_FLEX_FOB_YS3614_UC,
]