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,4 +1,6 @@
"""Support for Tellstick switches using Tellstick Net."""
from typing import Any
from homeassistant.components import switch
from homeassistant.components.switch import SwitchEntity
from homeassistant.config_entries import ConfigEntry
@ -37,12 +39,12 @@ class TelldusLiveSwitch(TelldusLiveEntity, SwitchEntity):
"""Return true if switch is on."""
return self.device.is_on
def turn_on(self, **kwargs):
def turn_on(self, **kwargs: Any) -> None:
"""Turn the switch on."""
self.device.turn_on()
self._update_callback()
def turn_off(self, **kwargs):
def turn_off(self, **kwargs: Any) -> None:
"""Turn the switch off."""
self.device.turn_off()
self._update_callback()