def mock_psc(hass, config_input, domain): """Mock the prepare_setup_component to capture config.""" res = prepare_setup_component(hass, config_input, domain) config[domain] = None if res is None else res.get(domain) _LOGGER.debug('Configuration for %s, Validated: %s, Original %s', domain, config[domain], config_input.get(domain)) return res
def prepare_reload(self): """Prepare reloading this entity component.""" try: path = conf_util.find_config_file(self.hass.config.config_dir) conf = conf_util.load_yaml_config_file(path) except HomeAssistantError as err: self.logger.error(err) return None conf = prepare_setup_component(self.hass, conf, self.domain) if conf is None: return None self.reset() return conf