Correct typing in bsblan and activate mypy (#53153)
This commit is contained in:
parent
3d40fdf2c6
commit
d4589894fe
4 changed files with 20 additions and 22 deletions
|
@ -25,6 +25,7 @@ from homeassistant.const import (
|
|||
ATTR_TEMPERATURE,
|
||||
TEMP_CELSIUS,
|
||||
TEMP_FAHRENHEIT,
|
||||
UnitTemperatureT,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
|
@ -100,7 +101,7 @@ class BSBLanClimate(ClimateEntity):
|
|||
self._hvac_mode: str | None = None
|
||||
self._target_temperature: float | None = None
|
||||
self._temperature_unit = None
|
||||
self._preset_mode = None
|
||||
self._preset_mode: str | None = None
|
||||
self._store_hvac_mode = None
|
||||
self._info: Info = info
|
||||
self.bsblan = bsblan
|
||||
|
@ -121,7 +122,7 @@ class BSBLanClimate(ClimateEntity):
|
|||
return self._info.device_identification
|
||||
|
||||
@property
|
||||
def temperature_unit(self) -> str:
|
||||
def temperature_unit(self) -> UnitTemperatureT:
|
||||
"""Return the unit of measurement which this thermostat uses."""
|
||||
if self._temperature_unit == "°C":
|
||||
return TEMP_CELSIUS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue