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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user