mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-12 18:38:03 +00:00
Enable ruff check for ANN (#1139)
This commit is contained in:
@@ -14,7 +14,7 @@ class TemperatureSensor(SmartModule):
|
||||
REQUIRED_COMPONENT = "temperature"
|
||||
QUERY_GETTER_NAME = "get_comfort_temp_config"
|
||||
|
||||
def _initialize_features(self):
|
||||
def _initialize_features(self) -> None:
|
||||
"""Initialize features after the initial update."""
|
||||
self._add_feature(
|
||||
Feature(
|
||||
@@ -60,7 +60,7 @@ class TemperatureSensor(SmartModule):
|
||||
return {}
|
||||
|
||||
@property
|
||||
def temperature(self):
|
||||
def temperature(self) -> float:
|
||||
"""Return current humidity in percentage."""
|
||||
return self._device.sys_info["current_temp"]
|
||||
|
||||
@@ -74,6 +74,8 @@ class TemperatureSensor(SmartModule):
|
||||
"""Return current temperature unit."""
|
||||
return self._device.sys_info["temp_unit"]
|
||||
|
||||
async def set_temperature_unit(self, unit: Literal["celsius", "fahrenheit"]):
|
||||
async def set_temperature_unit(
|
||||
self, unit: Literal["celsius", "fahrenheit"]
|
||||
) -> dict:
|
||||
"""Set the device temperature unit."""
|
||||
return await self.call("set_temperature_unit", {"temp_unit": unit})
|
||||
|
Reference in New Issue
Block a user