mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00:00
Adjust set_humidity type hints (#85176)
This commit is contained in:
parent
240b4078cd
commit
3a02c627fa
@ -144,7 +144,7 @@ class EcobeeHumidifier(HumidifierEntity):
|
|||||||
self.data.ecobee.set_humidifier_mode(self.thermostat_index, mode)
|
self.data.ecobee.set_humidifier_mode(self.thermostat_index, mode)
|
||||||
self.update_without_throttle = True
|
self.update_without_throttle = True
|
||||||
|
|
||||||
def set_humidity(self, humidity):
|
def set_humidity(self, humidity: int) -> None:
|
||||||
"""Set the humidity level."""
|
"""Set the humidity level."""
|
||||||
self.data.ecobee.set_humidity(self.thermostat_index, humidity)
|
self.data.ecobee.set_humidity(self.thermostat_index, humidity)
|
||||||
self.update_without_throttle = True
|
self.update_without_throttle = True
|
||||||
|
@ -270,7 +270,7 @@ class GenericHygrostat(HumidifierEntity, RestoreEntity):
|
|||||||
await self._async_device_turn_off()
|
await self._async_device_turn_off()
|
||||||
await self.async_update_ha_state()
|
await self.async_update_ha_state()
|
||||||
|
|
||||||
async def async_set_humidity(self, humidity: int):
|
async def async_set_humidity(self, humidity: int) -> None:
|
||||||
"""Set new target humidity."""
|
"""Set new target humidity."""
|
||||||
if humidity is None:
|
if humidity is None:
|
||||||
return
|
return
|
||||||
|
@ -130,9 +130,9 @@ class SaunaClimate(ToloSaunaCoordinatorEntity, ClimateEntity):
|
|||||||
"""Set fan mode."""
|
"""Set fan mode."""
|
||||||
self.coordinator.client.set_fan_on(fan_mode == FAN_ON)
|
self.coordinator.client.set_fan_on(fan_mode == FAN_ON)
|
||||||
|
|
||||||
def set_humidity(self, humidity: float) -> None:
|
def set_humidity(self, humidity: int) -> None:
|
||||||
"""Set desired target humidity."""
|
"""Set desired target humidity."""
|
||||||
self.coordinator.client.set_target_humidity(round(humidity))
|
self.coordinator.client.set_target_humidity(humidity)
|
||||||
|
|
||||||
def set_temperature(self, **kwargs: Any) -> None:
|
def set_temperature(self, **kwargs: Any) -> None:
|
||||||
"""Set desired target temperature."""
|
"""Set desired target temperature."""
|
||||||
|
@ -296,7 +296,7 @@ class TuyaClimateEntity(TuyaEntity, ClimateEntity):
|
|||||||
"""Set new target fan mode."""
|
"""Set new target fan mode."""
|
||||||
self._send_command([{"code": DPCode.FAN_SPEED_ENUM, "value": fan_mode}])
|
self._send_command([{"code": DPCode.FAN_SPEED_ENUM, "value": fan_mode}])
|
||||||
|
|
||||||
def set_humidity(self, humidity: float) -> None:
|
def set_humidity(self, humidity: int) -> None:
|
||||||
"""Set new target humidity."""
|
"""Set new target humidity."""
|
||||||
if self._set_humidity is None:
|
if self._set_humidity is None:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
|
@ -146,7 +146,7 @@ class TuyaHumidifierEntity(TuyaEntity, HumidifierEntity):
|
|||||||
"""Turn the device off."""
|
"""Turn the device off."""
|
||||||
self._send_command([{"code": self._switch_dpcode, "value": False}])
|
self._send_command([{"code": self._switch_dpcode, "value": False}])
|
||||||
|
|
||||||
def set_humidity(self, humidity):
|
def set_humidity(self, humidity: int) -> None:
|
||||||
"""Set new target humidity."""
|
"""Set new target humidity."""
|
||||||
if self._set_humidity is None:
|
if self._set_humidity is None:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user