Skip to content

Commit

Permalink
Fix NSPanel Climate disable without switch configuration AlexxIT#919
Browse files Browse the repository at this point in the history
  • Loading branch information
sipimokus authored Aug 29, 2022
1 parent 51d1e7a commit b6b2b2d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/sonoff/core/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ def get_spec(device: dict) -> list:
classes = [cls for cls in classes if XSwitches not in cls.__bases__]
classes.append(XCoverDualR3)

# NSPanel Climate disable without switch configuration
if uiid in [133] and not device["params"].get("HMI_ATCDevice"):
classes = [cls for cls in classes if XClimateNS not in cls.__bases__]

if "device_class" in device:
classes = get_custom_spec(classes, device["device_class"])

Expand Down

0 comments on commit b6b2b2d

Please sign in to comment.