Improve entity type hints [t] (#77883)

This commit is contained in:
epenet 2022-09-06 13:35:52 +02:00 committed by GitHub
parent 0c767bd0d3
commit 458001a06e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 67 additions and 60 deletions

View file

@ -1,7 +1,7 @@
"""Platform for Roth Touchline floor heating controller."""
from __future__ import annotations
from typing import NamedTuple
from typing import Any, NamedTuple
from pytouchline import PyTouchline
import voluptuous as vol
@ -75,7 +75,7 @@ class Touchline(ClimateEntity):
self._current_operation_mode = None
self._preset_mode = None
def update(self):
def update(self) -> None:
"""Update thermostat attributes."""
self.unit.update()
self._name = self.unit.get_name()
@ -120,7 +120,7 @@ class Touchline(ClimateEntity):
"""Set new target hvac mode."""
self._current_operation_mode = HVACMode.HEAT
def set_temperature(self, **kwargs):
def set_temperature(self, **kwargs: Any) -> None:
"""Set new target temperature."""
if kwargs.get(ATTR_TEMPERATURE) is not None:
self._target_temperature = kwargs.get(ATTR_TEMPERATURE)