mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Improve type hints in hive (#77586)
This commit is contained in:
parent
c15faa161b
commit
86c7f0bbac
@ -128,12 +128,12 @@ class HiveClimateEntity(HiveEntity, ClimateEntity):
|
||||
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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user