Use assignment expressions 36 (#58825)

This commit is contained in:
Marc Mueller 2021-10-31 18:35:27 +01:00 committed by GitHub
parent 3f1b4906bf
commit 1ce889be60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 28 additions and 60 deletions

View file

@ -91,8 +91,7 @@ class LcnFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
return self.async_abort(reason="connection_timeout")
# check if we already have a host with the same address configured
entry = get_config_entry(self.hass, data)
if entry:
if entry := get_config_entry(self.hass, data):
entry.source = config_entries.SOURCE_IMPORT
# Cleanup entity and device registry, if we imported from configuration.yaml to