From 9edc6249ca094afe002198d57ed3db8f9ee6075f Mon Sep 17 00:00:00 2001 From: Matrix Date: Tue, 21 Oct 2025 16:18:18 +0800 Subject: [PATCH] YoLink remove unsupported remoters (#154918) --- homeassistant/components/yolink/__init__.py | 7 ++++++- homeassistant/components/yolink/const.py | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/yolink/__init__.py b/homeassistant/components/yolink/__init__.py index f33da34c1fc..65ca84863f1 100644 --- a/homeassistant/components/yolink/__init__.py +++ b/homeassistant/components/yolink/__init__.py @@ -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) diff --git a/homeassistant/components/yolink/const.py b/homeassistant/components/yolink/const.py index 851b65e1a15..09bc2e1ff01 100644 --- a/homeassistant/components/yolink/const.py +++ b/homeassistant/components/yolink/const.py @@ -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, +]