Improve entity type hints [f] (#77143)

This commit is contained in:
epenet 2022-08-22 13:36:33 +02:00 committed by GitHub
parent b108ddbfd3
commit 58b9785485
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 93 additions and 79 deletions

View file

@ -1,5 +1,6 @@
"""Support for Firmata switch output."""
import logging
from typing import Any
from homeassistant.components.switch import SwitchEntity
from homeassistant.config_entries import ConfigEntry
@ -57,12 +58,12 @@ class FirmataSwitch(FirmataPinEntity, SwitchEntity):
"""Return true if switch is on."""
return self._api.is_on
async def async_turn_on(self, **kwargs) -> None:
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn on switch."""
await self._api.turn_on()
self.async_write_ha_state()
async def async_turn_off(self, **kwargs) -> None:
async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn off switch."""
await self._api.turn_off()
self.async_write_ha_state()