mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Improve type hints in heatmiser (#77592)
This commit is contained in:
parent
152022aef3
commit
c15faa161b
@ -2,6 +2,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
from heatmiserV3 import connection, heatmiser
|
from heatmiserV3 import connection, heatmiser
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
@ -100,9 +101,10 @@ class HeatmiserV3Thermostat(ClimateEntity):
|
|||||||
"""Return the temperature we try to reach."""
|
"""Return the temperature we try to reach."""
|
||||||
return self._target_temperature
|
return self._target_temperature
|
||||||
|
|
||||||
def set_temperature(self, **kwargs):
|
def set_temperature(self, **kwargs: Any) -> None:
|
||||||
"""Set new target temperature."""
|
"""Set new target temperature."""
|
||||||
temperature = kwargs.get(ATTR_TEMPERATURE)
|
if (temperature := kwargs.get(ATTR_TEMPERATURE)) is None:
|
||||||
|
return
|
||||||
self._target_temperature = int(temperature)
|
self._target_temperature = int(temperature)
|
||||||
self.therm.set_target_temp(self._target_temperature)
|
self.therm.set_target_temp(self._target_temperature)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user