Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Add display switch to fan devices. (#32)
Browse files Browse the repository at this point in the history
* Improve night_light feature discovery

* add display switch to fans

* revert night_light removal from humidifier

* Improve switch detection

* Update light.py

* fix style
  • Loading branch information
vlebourl authored Jul 11, 2022
1 parent cdbb0b8 commit 3498625
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/vesync/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ async def async_process_devices(hass, manager):
else:
if hasattr(fan, "config_dict"):
devices[VS_NUMBERS].append(fan)
devices[VS_SWITCHES].append(fan) # for automatic stop and display
devices[VS_FANS].append(fan)
_LOGGER.info("%d VeSync fans found", len(manager.fans))

Expand Down
2 changes: 2 additions & 0 deletions custom_components/vesync/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def _setup_entities(devices, async_add_entities):
VeSyncHumidifierAutoOnHA(dev),
)
)
elif getattr(dev, "turn_on_display", None):
entities.append(VeSyncHumidifierDisplayHA(dev))

else:
_LOGGER.warning(
Expand Down

0 comments on commit 3498625

Please sign in to comment.