Add init type hints [k-l] (#63188)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet
2022-01-02 16:34:33 +01:00
committed by GitHub
parent 1d41e5b0c6
commit e02f0c34e5
17 changed files with 57 additions and 26 deletions

View File

@@ -7,6 +7,8 @@ import time
import lirc
from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP
from homeassistant.core import HomeAssistant
from homeassistant.helpers.typing import ConfigType
_LOGGER = logging.getLogger(__name__)
@@ -19,7 +21,7 @@ EVENT_IR_COMMAND_RECEIVED = "ir_command_received"
ICON = "mdi:remote"
def setup(hass, config):
def setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the LIRC capability."""
# blocking=True gives unexpected behavior (multiple responses for 1 press)
# also by not blocking, we allow hass to shut down the thread gracefully