Address late Netgear review comments (#64428)

pull/64450/head
starkillerOG 2022-01-19 12:11:23 +01:00 committed by GitHub
parent f467f0a094
commit 5d7cda850b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -25,12 +25,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
port = entry.data.get(CONF_PORT)
ssl = entry.data.get(CONF_SSL)
if port != router.port or ssl != router.ssl:
data = entry.data.copy()
data[CONF_PORT] = router.port
data[CONF_SSL] = router.ssl
data = {**entry.data, CONF_PORT: router.port, CONF_SSL: router.ssl}
hass.config_entries.async_update_entry(entry, data=data)
_LOGGER.info(
"Netgear port-SSL combination updated from (%i, %r) to (%i, %r), this should only occur after a firmware update",
"Netgear port-SSL combination updated from (%i, %r) to (%i, %r), "
"this should only occur after a firmware update",
port,
ssl,
router.port,