I am importing a script for a specific flow and need to access my domain’s config. Is there a better way to do this? It appears I must do a full restart to reload the config.
#__init__.py
from . import script
async def async_setup(hass: HomeAssistant, _config: Config):
"""Set up this integration using YAML is not supported."""
if hass.data.get(DOMAIN) is None:
hass.data.setdefault(DOMAIN, {})
hass.data[DOMAIN]['CONFIG'] = _config[DOMAIN]
return True
#script.py
async def execute(self, command, data, params, challenge):
config = self.hass.data[DOMAIN]['CONFIG']