Improve entity type hints [n] (#77824)

This commit is contained in:
epenet 2022-09-05 14:53:55 +02:00 committed by GitHub
parent 42393db9f3
commit 420733a064
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 69 additions and 59 deletions

View file

@ -92,7 +92,7 @@ class NumatoGpioBinarySensor(BinarySensorEntity):
self._state = None
self._api = api
async def async_added_to_hass(self):
async def async_added_to_hass(self) -> None:
"""Connect state update callback."""
self.async_on_remove(
async_dispatcher_connect(
@ -118,7 +118,7 @@ class NumatoGpioBinarySensor(BinarySensorEntity):
"""Return the state of the entity."""
return self._state != self._invert_logic
def update(self):
def update(self) -> None:
"""Update the GPIO state."""
try:
self._state = self._api.read_input(self._device_id, self._port)