mirror of
https://github.com/micahqcade/custom_vesync.git
synced 2025-02-11 09:39:00 +01:00
Add display switch to fan devices. (#32)
* Improve night_light feature discovery * add display switch to fans * revert night_light removal from humidifier * Improve switch detection * Update light.py * fix style
This commit is contained in:
parent
cdbb0b8294
commit
3498625de7
@ -59,6 +59,7 @@ async def async_process_devices(hass, manager):
|
|||||||
else:
|
else:
|
||||||
if hasattr(fan, "config_dict"):
|
if hasattr(fan, "config_dict"):
|
||||||
devices[VS_NUMBERS].append(fan)
|
devices[VS_NUMBERS].append(fan)
|
||||||
|
devices[VS_SWITCHES].append(fan) # for automatic stop and display
|
||||||
devices[VS_FANS].append(fan)
|
devices[VS_FANS].append(fan)
|
||||||
_LOGGER.info("%d VeSync fans found", len(manager.fans))
|
_LOGGER.info("%d VeSync fans found", len(manager.fans))
|
||||||
|
|
||||||
|
@ -52,6 +52,8 @@ def _setup_entities(devices, async_add_entities):
|
|||||||
VeSyncHumidifierAutoOnHA(dev),
|
VeSyncHumidifierAutoOnHA(dev),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
elif getattr(dev, "turn_on_display", None):
|
||||||
|
entities.append(VeSyncHumidifierDisplayHA(dev))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user