Always send ozw network key to add-on config (#43938)

pull/44175/head
Martin Hjelmare 2020-12-04 20:23:20 +01:00 committed by Franck Nijhof
parent fb005ba3e2
commit 698ee59f10
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
1 changed files with 4 additions and 3 deletions

View File

@ -147,9 +147,10 @@ class DomainConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
self.network_key = user_input[CONF_NETWORK_KEY]
self.usb_path = user_input[CONF_USB_PATH]
new_addon_config = {CONF_ADDON_DEVICE: self.usb_path}
if self.network_key:
new_addon_config[CONF_ADDON_NETWORK_KEY] = self.network_key
new_addon_config = {
CONF_ADDON_DEVICE: self.usb_path,
CONF_ADDON_NETWORK_KEY: self.network_key,
}
if new_addon_config != self.addon_config:
await self._async_set_addon_config(new_addon_config)