Improve entity type hints [h] (#77468)
This commit is contained in:
parent
05264cedfa
commit
a1374963d1
38 changed files with 153 additions and 124 deletions
|
@ -1,4 +1,6 @@
|
|||
"""Support for HLK-SW16 switches."""
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.components.switch import SwitchEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -36,10 +38,10 @@ class SW16Switch(SW16Device, SwitchEntity):
|
|||
"""Return true if device is on."""
|
||||
return self._is_on
|
||||
|
||||
async def async_turn_on(self, **kwargs):
|
||||
async def async_turn_on(self, **kwargs: Any) -> None:
|
||||
"""Turn the device on."""
|
||||
await self._client.turn_on(self._device_port)
|
||||
|
||||
async def async_turn_off(self, **kwargs):
|
||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
||||
"""Turn the device off."""
|
||||
await self._client.turn_off(self._device_port)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue