Skip to content

Commit f6ac23c

Browse files
matrixd2frenck
authored andcommitted
YoLink remove unsupported remoters (home-assistant#154918)
1 parent 244b643 commit f6ac23c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

homeassistant/components/yolink/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from homeassistant.helpers.typing import ConfigType
2727

2828
from . import api
29-
from .const import ATTR_LORA_INFO, DOMAIN, YOLINK_EVENT
29+
from .const import ATTR_LORA_INFO, DOMAIN, SUPPORTED_REMOTERS, YOLINK_EVENT
3030
from .coordinator import YoLinkCoordinator
3131
from .device_trigger import CONF_LONG_PRESS, CONF_SHORT_PRESS
3232
from .services import async_setup_services
@@ -151,6 +151,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
151151
device_pairing_mapping[parent_id] = device.device_id
152152

153153
for device in yolink_home.get_devices():
154+
if (
155+
device.device_type == ATTR_DEVICE_SMART_REMOTER
156+
and device.device_model_name not in SUPPORTED_REMOTERS
157+
):
158+
continue
154159
paried_device: YoLinkDevice | None = None
155160
if (
156161
paried_device_id := device_pairing_mapping.get(device.device_id)

homeassistant/components/yolink/const.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,10 @@
4444
DEV_MODEL_LEAK_STOP_YS5029 = "YS5029"
4545
DEV_MODEL_WATER_METER_YS5018_EC = "YS5018-EC"
4646
DEV_MODEL_WATER_METER_YS5018_UC = "YS5018-UC"
47+
48+
SUPPORTED_REMOTERS = [
49+
DEV_MODEL_FLEX_FOB_YS3604_EC,
50+
DEV_MODEL_FLEX_FOB_YS3604_UC,
51+
DEV_MODEL_FLEX_FOB_YS3614_EC,
52+
DEV_MODEL_FLEX_FOB_YS3614_UC,
53+
]

0 commit comments

Comments
 (0)