mirror of
https://github.com/micahqcade/custom_vesync.git
synced 2025-02-11 09:39:00 +01:00
parent
a6015cd12e
commit
f7d1947423
@ -31,6 +31,7 @@ DEV_TYPE_TO_HA = {
|
||||
"LAP-C202S-WUSR": "fan",
|
||||
"LAP-C401S-WUSR": "fan",
|
||||
"LAP-C601S-WUS": "fan",
|
||||
"LAP-C601S-WEU": "fan",
|
||||
"LV-PUR131S": "fan",
|
||||
"Classic300S": "humidifier",
|
||||
"ESD16": "walldimmer",
|
||||
|
@ -226,7 +226,10 @@ class VeSyncHumidifierNightLightHA(VeSyncDimmableLightHA):
|
||||
@property
|
||||
def is_on(self):
|
||||
"""Return True if night light is on."""
|
||||
return self.smarthumidifier.details["night_light_brightness"] > 0
|
||||
if self.device.config_dict["module"] == "VeSyncAirBypass":
|
||||
return self.smarthumidifier.details["night_light"] == "on"
|
||||
else:
|
||||
return self.smarthumidifier.details["night_light_brightness"] > 0
|
||||
|
||||
@property
|
||||
def entity_category(self):
|
||||
@ -238,9 +241,14 @@ class VeSyncHumidifierNightLightHA(VeSyncDimmableLightHA):
|
||||
if ATTR_BRIGHTNESS in kwargs:
|
||||
brightness = _ha_brightness_to_vesync(kwargs[ATTR_BRIGHTNESS])
|
||||
self.smarthumidifier.set_night_light_brightness(brightness)
|
||||
elif self.device.config_dict["module"] == "VeSyncAirBypass":
|
||||
self.smarthumidifier.set_night_light("on")
|
||||
else:
|
||||
self.smarthumidifier.set_night_light_brightness(100)
|
||||
|
||||
def turn_off(self, **kwargs):
|
||||
"""Turn the night light off."""
|
||||
self.smarthumidifier.set_night_light_brightness(0)
|
||||
if self.device.config_dict["module"] == "VeSyncAirBypass":
|
||||
self.smarthumidifier.set_night_light("off")
|
||||
else:
|
||||
self.smarthumidifier.set_night_light_brightness(0)
|
||||
|
@ -50,7 +50,7 @@ def _setup_entities(devices, async_add_entities):
|
||||
if has_feature(dev, "details", "warm_mist_level"):
|
||||
entities.append(VeSyncHumidifierWarmthLevelHA(dev))
|
||||
if has_feature(dev, "config_dict", "levels"):
|
||||
entities.append((VeSyncFanSpeedLevelHA(dev),))
|
||||
entities.append(VeSyncFanSpeedLevelHA(dev))
|
||||
|
||||
async_add_entities(entities, update_before_add=True)
|
||||
|
||||
|
@ -131,7 +131,7 @@ class VeSyncFanChildLockHA(VeSyncSwitchEntity):
|
||||
@property
|
||||
def is_on(self):
|
||||
"""Return True if it is locked."""
|
||||
return self.device.details["child_locked"]
|
||||
return self.device.details["child_lock"]
|
||||
|
||||
def turn_on(self, **kwargs):
|
||||
"""Turn the lock on."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user