Vesync switch humidifier to property (#135949)

This commit is contained in:
cdnninja 2025-01-19 03:43:16 -07:00 committed by GitHub
parent 02347d5d36
commit 85bea5b70e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,12 +120,12 @@ class VeSyncHumidifierHA(VeSyncBaseEntity, HumidifierEntity):
@property
def target_humidity(self) -> int:
"""Return the humidity we try to reach."""
return self.device.config["auto_target_humidity"]
return self.device.auto_humidity
@property
def mode(self) -> str | None:
"""Get the current preset mode."""
return _get_ha_mode(self.device.details["mode"])
return _get_ha_mode(self.device.mode)
def set_humidity(self, humidity: int) -> None:
"""Set the target humidity of the device."""