Improve entity type hints [h] (#77468)

This commit is contained in:
epenet 2022-08-30 20:55:01 +02:00 committed by GitHub
parent 05264cedfa
commit a1374963d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 153 additions and 124 deletions

View file

@ -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)