Add binary_sensor setup type hints [o-r] (#63270)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-03 11:35:02 +01:00 committed by GitHub
parent 33e4251606
commit 545b10a711
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 221 additions and 35 deletions

View file

@ -6,8 +6,10 @@ from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntity,
)
from homeassistant.core import callback
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import (
DOMAIN as DOMAIN_RACHIO,
@ -31,7 +33,11 @@ from .webhooks import (
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, config_entry, async_add_entities):
async def async_setup_entry(
hass: HomeAssistant,
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up the Rachio binary sensors."""
entities = await hass.async_add_executor_job(_create_entities, hass, config_entry)
async_add_entities(entities)