Skip to content

Commit 68c99c7

Browse files
committed
Fix reloading config with secrets
1 parent bc7ba67 commit 68c99c7

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

custom_components/patch/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
101101

102102
async def async_reload(_: ServiceCall) -> None:
103103
"""Patch the core files using the new configuration."""
104-
config = homeassistant.config.load_yaml_config_file(
105-
hass.config.path(homeassistant.config.YAML_CONFIG_FILE)
106-
)
104+
config = await homeassistant.config.async_hass_config_yaml(hass)
107105
if DOMAIN not in config:
108106
message = (
109107
f"'{DOMAIN}' section was not found in "

0 commit comments

Comments
 (0)