def mock_psc(hass, config_input, domain): """Mock the prepare_setup_component to capture config.""" res = yield from async_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 async_prepare_reload(self): """Prepare reloading this entity component. This method must be run in the event loop. """ try: conf = yield from \ conf_util.async_hass_config_yaml(self.hass) except HomeAssistantError as err: self.logger.error(err) return None conf = yield from async_prepare_setup_component( self.hass, conf, self.domain) if conf is None: return None yield from self.async_reset() return conf