Ensure service calls are typed [o-r] (#62920)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-28 13:10:17 +01:00 committed by GitHub
parent f6c1266af6
commit a19c95e4bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 44 additions and 41 deletions

View file

@ -24,7 +24,7 @@ from homeassistant.const import (
HTTP_DIGEST_AUTHENTICATION,
SERVICE_RELOAD,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.core import HomeAssistant, ServiceCall, callback
from homeassistant.helpers import discovery, template
from homeassistant.helpers.entity_component import (
DEFAULT_SCAN_INTERVAL,
@ -49,7 +49,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
component = EntityComponent(_LOGGER, DOMAIN, hass)
_async_setup_shared_data(hass)
async def reload_service_handler(service):
async def reload_service_handler(service: ServiceCall) -> None:
"""Remove all user-defined groups and load new ones from config."""
if (conf := await component.async_prepare_reload()) is None:
return