Move lutron_caseta migration to happen after successful setup (#75204)
This commit is contained in:
parent
fde3489e86
commit
5f08052f40
1 changed files with 1 additions and 2 deletions
|
@ -143,8 +143,6 @@ async def async_setup_entry(
|
|||
ca_certs = hass.config.path(config_entry.data[CONF_CA_CERTS])
|
||||
bridge = None
|
||||
|
||||
await _async_migrate_unique_ids(hass, config_entry)
|
||||
|
||||
try:
|
||||
bridge = Smartbridge.create_tls(
|
||||
hostname=host, keyfile=keyfile, certfile=certfile, ca_certs=ca_certs
|
||||
|
@ -167,6 +165,7 @@ async def async_setup_entry(
|
|||
raise ConfigEntryNotReady(f"Cannot connect to {host}")
|
||||
|
||||
_LOGGER.debug("Connected to Lutron Caseta bridge via LEAP at %s", host)
|
||||
await _async_migrate_unique_ids(hass, config_entry)
|
||||
|
||||
devices = bridge.get_devices()
|
||||
bridge_device = devices[BRIDGE_DEVICE_ID]
|
||||
|
|
Loading…
Add table
Reference in a new issue