1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-17 15:44:52 +01:00

Improve type hints in nuheat climate (#164975)

This commit is contained in:
epenet
2026-03-06 18:04:24 +01:00
committed by GitHub
parent 8b545a6e76
commit 618687ea05

View File

@@ -99,7 +99,7 @@ class NuHeatThermostat(CoordinatorEntity[NuHeatCoordinator], ClimateEntity):
return UnitOfTemperature.FAHRENHEIT
@property
def current_temperature(self):
def current_temperature(self) -> int | None:
"""Return the current temperature."""
if self._temperature_unit == "C":
return self._thermostat.celsius
@@ -147,7 +147,7 @@ class NuHeatThermostat(CoordinatorEntity[NuHeatCoordinator], ClimateEntity):
return self._thermostat.max_fahrenheit
@property
def target_temperature(self):
def target_temperature(self) -> int:
"""Return the currently programmed temperature."""
if self._temperature_unit == "C":
return nuheat_to_celsius(self._target_temperature)