Skip to content

Commit

Permalink
Fix protocol setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mletenay committed May 17, 2024
1 parent a8f1e83 commit 798c04a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/goodwe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up the Goodwe components from a config entry."""
hass.data.setdefault(DOMAIN, {})
host = entry.options.get(CONF_HOST, entry.data[CONF_HOST])
protocol = entry.options.get(CONF_PROTOCOL, entry.data[CONF_PROTOCOL])
protocol = entry.options.get(CONF_PROTOCOL, entry.data.get(CONF_PROTOCOL), "UDP")
keep_alive = entry.options.get(CONF_KEEP_ALIVE, protocol != "TCP")
model_family = entry.options.get(CONF_MODEL_FAMILY, entry.data[CONF_MODEL_FAMILY])
network_retries = entry.options.get(CONF_NETWORK_RETRIES, DEFAULT_NETWORK_RETRIES)
Expand Down

0 comments on commit 798c04a

Please sign in to comment.