mirror of
https://github.com/home-assistant/core.git
synced 2026-08-28 02:24:46 -05:00
Switchbot Cloud: Unify coding style [Water Detector] (#178324)
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user