mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Improve type hints in insteon (#77532)
This commit is contained in:
parent
7f55e26cd1
commit
b366354d55
@ -208,9 +208,9 @@ class InsteonClimateEntity(InsteonEntity, ClimateEntity):
|
|||||||
mode = list(HVAC_MODES)[list(HVAC_MODES.values()).index(hvac_mode)]
|
mode = list(HVAC_MODES)[list(HVAC_MODES.values()).index(hvac_mode)]
|
||||||
await self._insteon_device.async_set_mode(mode)
|
await self._insteon_device.async_set_mode(mode)
|
||||||
|
|
||||||
async def async_set_humidity(self, humidity):
|
async def async_set_humidity(self, humidity: int) -> None:
|
||||||
"""Set new humidity level."""
|
"""Set new humidity level."""
|
||||||
change = humidity - self.target_humidity
|
change = humidity - (self.target_humidity or 0)
|
||||||
high = self._insteon_device.groups[HUMIDITY_HIGH].value + change
|
high = self._insteon_device.groups[HUMIDITY_HIGH].value + change
|
||||||
low = self._insteon_device.groups[HUMIDITY_LOW].value + change
|
low = self._insteon_device.groups[HUMIDITY_LOW].value + change
|
||||||
await self._insteon_device.async_set_humidity_low_set_point(low)
|
await self._insteon_device.async_set_humidity_low_set_point(low)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user