Improve type hints in insteon (#77532)

This commit is contained in:
epenet 2022-08-30 20:56:10 +02:00 committed by GitHub
parent 7f55e26cd1
commit b366354d55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,9 +208,9 @@ class InsteonClimateEntity(InsteonEntity, ClimateEntity):
mode = list(HVAC_MODES)[list(HVAC_MODES.values()).index(hvac_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."""
change = humidity - self.target_humidity
change = humidity - (self.target_humidity or 0)
high = self._insteon_device.groups[HUMIDITY_HIGH].value + change
low = self._insteon_device.groups[HUMIDITY_LOW].value + change
await self._insteon_device.async_set_humidity_low_set_point(low)