mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix small coding style in recent overkiz code (#82966)
* Fix small coding style * Use kwargs[ATTR_TEMPERATURE] in overkiz water_heater * Fix grammar Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
5789790d32
commit
21c051935f
@ -230,7 +230,7 @@ class DomesticHotWaterProduction(OverkizEntity, WaterHeaterEntity):
|
||||
|
||||
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||
"""Set new target temperature."""
|
||||
target_temperature = kwargs.get(ATTR_TEMPERATURE)
|
||||
target_temperature = kwargs[ATTR_TEMPERATURE]
|
||||
|
||||
if self.executor.has_command(OverkizCommand.SET_TARGET_TEMPERATURE):
|
||||
await self.executor.async_execute_command(
|
||||
@ -299,7 +299,8 @@ class DomesticHotWaterProduction(OverkizEntity, WaterHeaterEntity):
|
||||
return
|
||||
|
||||
if self._is_boost_mode_on:
|
||||
# We're setting a non Boost mode and the device is currently in Boost mode, the following code remove all boost operations
|
||||
# We're setting a non Boost mode and the device is currently in Boost mode
|
||||
# The following code removes all boost operations
|
||||
if self.executor.has_command(OverkizCommand.SET_BOOST_MODE):
|
||||
await self.executor.async_execute_command(
|
||||
OverkizCommand.SET_BOOST_MODE, OverkizCommand.OFF
|
||||
|
@ -1,7 +1,7 @@
|
||||
"""Support for Hitachi DHW."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, cast
|
||||
from typing import Any
|
||||
|
||||
from pyoverkiz.enums import OverkizCommand, OverkizCommandParam, OverkizState
|
||||
|
||||
@ -63,9 +63,10 @@ class HitachiDHW(OverkizEntity, WaterHeaterEntity):
|
||||
|
||||
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||
"""Set new target temperature."""
|
||||
temperature = cast(float, kwargs.get(ATTR_TEMPERATURE))
|
||||
|
||||
await self.executor.async_execute_command(
|
||||
OverkizCommand.SET_CONTROL_DHW_SETTING_TEMPERATURE, int(temperature)
|
||||
OverkizCommand.SET_CONTROL_DHW_SETTING_TEMPERATURE,
|
||||
int(kwargs[ATTR_TEMPERATURE]),
|
||||
)
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user