Improve entity type hints [n] (#77824)
This commit is contained in:
parent
42393db9f3
commit
420733a064
22 changed files with 69 additions and 59 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue