From 3306b75fe3dc7fd95159f45820fdf619ea031d34 Mon Sep 17 00:00:00 2001 From: Samuel Xiao <40679757+XiaoLing-git@users.noreply.github.com> Date: Thu, 6 Aug 2026 16:34:39 +0800 Subject: [PATCH] Switchbot Cloud: Unify coding style [Water Detector] (#178324) --- homeassistant/components/switchbot_cloud/__init__.py | 6 ------ homeassistant/components/switchbot_cloud/const.py | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/switchbot_cloud/__init__.py b/homeassistant/components/switchbot_cloud/__init__.py index 7cbfa0bd0d0c..44df0204e1a8 100644 --- a/homeassistant/components/switchbot_cloud/__init__.py +++ b/homeassistant/components/switchbot_cloud/__init__.py @@ -210,12 +210,6 @@ async def make_device_data( hass, entry, api, device, coordinators_by_id ) devices_data.fans.append((device, coordinator)) - if isinstance(device, Device) and device.device_type == "Water Detector": - coordinator = await coordinator_for_device( - hass, entry, api, device, coordinators_by_id, True - ) - devices_data.binary_sensors.append((device, coordinator)) - devices_data.sensors.append((device, coordinator)) if isinstance(device, Device) and device.device_type in [ "Curtain", diff --git a/homeassistant/components/switchbot_cloud/const.py b/homeassistant/components/switchbot_cloud/const.py index dcc6f5b1e2ec..7380523613c9 100644 --- a/homeassistant/components/switchbot_cloud/const.py +++ b/homeassistant/components/switchbot_cloud/const.py @@ -165,4 +165,7 @@ DEVICE_SUPPORT_MAP: Final[dict[str, SwitchbotCloudDeviceConfig]] = { "Battery Circulator Fan 2 Pro": SwitchbotCloudDeviceConfig( True, entity_config=(Platform.SENSOR, Platform.FAN) ), + "Water Detector": SwitchbotCloudDeviceConfig( + True, entity_config=(Platform.SENSOR, Platform.BINARY_SENSOR) + ), }