From fcf40d78d475785e4fc4cf25130b387c2659a202 Mon Sep 17 00:00:00 2001 From: Damien Guihal Date: Thu, 20 Apr 2023 22:09:50 +0200 Subject: [PATCH] Fix dualfan feature --- custom_components/sonoff/core/devices.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/sonoff/core/devices.py b/custom_components/sonoff/core/devices.py index 97f5c2d7..c4df343e 100644 --- a/custom_components/sonoff/core/devices.py +++ b/custom_components/sonoff/core/devices.py @@ -390,7 +390,11 @@ def get_spec(device: dict) -> list: # DualR3 in cover mode if uiid in [126, 165] and device["params"].get("workMode") == 2: classes = [cls for cls in classes if XSwitches not in cls.__bases__] - classes.insert(0, XCoverDualR3) + if device.get("device_class") == "dualfan": + classes.insert(0, XFanDualR3) + else: + classes.insert(0, XCoverDualR3) + return classes # NSPanel Climate disable without switch configuration if uiid in [133] and not device["params"].get("HMI_ATCDevice"):