Fix Home Connect services not being set up (#75997)

This commit is contained in:
Franck Nijhof 2022-07-31 22:14:09 +02:00 committed by GitHub
parent a95851c9c2
commit 4af95ecf78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,24 +117,22 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up Home Connect component.""" """Set up Home Connect component."""
hass.data[DOMAIN] = {} hass.data[DOMAIN] = {}
if DOMAIN not in config: if DOMAIN in config:
return True await async_import_client_credential(
hass,
await async_import_client_credential( DOMAIN,
hass, ClientCredential(
DOMAIN, config[DOMAIN][CONF_CLIENT_ID],
ClientCredential( config[DOMAIN][CONF_CLIENT_SECRET],
config[DOMAIN][CONF_CLIENT_ID], ),
config[DOMAIN][CONF_CLIENT_SECRET], )
), _LOGGER.warning(
) "Configuration of Home Connect integration in YAML is deprecated and "
_LOGGER.warning( "will be removed in a future release; Your existing OAuth "
"Configuration of Home Connect integration in YAML is deprecated and " "Application Credentials have been imported into the UI "
"will be removed in a future release; Your existing OAuth " "automatically and can be safely removed from your "
"Application Credentials have been imported into the UI " "configuration.yaml file"
"automatically and can be safely removed from your " )
"configuration.yaml file"
)
async def _async_service_program(call, method): async def _async_service_program(call, method):
"""Execute calls to services taking a program.""" """Execute calls to services taking a program."""