mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Add type hint to reload_config in homeassistant scene (#63094)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
24e27290b5
commit
9ed7d82661
@ -173,17 +173,17 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
||||
# Store platform for later.
|
||||
platform = hass.data[DATA_PLATFORM] = entity_platform.async_get_current_platform()
|
||||
|
||||
async def reload_config(call):
|
||||
async def reload_config(call: ServiceCall) -> None:
|
||||
"""Reload the scene config."""
|
||||
try:
|
||||
conf = await conf_util.async_hass_config_yaml(hass)
|
||||
config = await conf_util.async_hass_config_yaml(hass)
|
||||
except HomeAssistantError as err:
|
||||
_LOGGER.error(err)
|
||||
return
|
||||
|
||||
integration = await async_get_integration(hass, SCENE_DOMAIN)
|
||||
|
||||
conf = await conf_util.async_process_component_config(hass, conf, integration)
|
||||
conf = await conf_util.async_process_component_config(hass, config, integration)
|
||||
|
||||
if not (conf and platform):
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user