Skip to content

Commit

Permalink
Improve type hints in hive (#77586)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet committed Aug 31, 2022
1 parent c15faa1 commit 86c7f0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/hive/climate.py
Expand Up @@ -128,12 +128,12 @@ async def async_set_temperature(self, **kwargs: Any) -> None:
await self.hive.heating.setTargetTemperature(self.device, new_temperature)

@refresh_system
async def async_set_preset_mode(self, preset_mode):
async def async_set_preset_mode(self, preset_mode: str) -> None:
"""Set new preset mode."""
if preset_mode == PRESET_NONE and self.preset_mode == PRESET_BOOST:
await self.hive.heating.setBoostOff(self.device)
elif preset_mode == PRESET_BOOST:
curtemp = round(self.current_temperature * 2) / 2
curtemp = round((self.current_temperature or 0) * 2) / 2
temperature = curtemp + 0.5
await self.hive.heating.setBoostOn(self.device, 30, temperature)

Expand Down

0 comments on commit 86c7f0b

Please sign in to comment.