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

Add display switch to fan devices. #32

Merged
merged 6 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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