Skip to content

Commit

Permalink
fix backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ateodorescu committed Feb 3, 2024
1 parent dff512e commit f82d159
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions custom_components/ipmi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,14 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
alias = config[CONF_ALIAS]
username = config[CONF_USERNAME]
password = config[CONF_PASSWORD]
ipmi_server_host = config[CONF_IPMI_SERVER_HOST]
addon_port = config[CONF_ADDON_PORT]


# keep backward compatibility
if config.get(CONF_IPMI_SERVER_HOST) is not None:
ipmi_server_host = config[CONF_IPMI_SERVER_HOST]
else:
ipmi_server_host = 'http://localhost'

scan_interval = entry.options.get(CONF_SCAN_INTERVAL, DEFAULT_SCAN_INTERVAL)

data = IpmiServer(hass, entry.entry_id, host, port, alias, username, password, ipmi_server_host, addon_port)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/ipmi/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/ateodorescu/home-assistant-ipmi/issues",
"requirements": ["python-ipmi"],
"version": "1.3.0",
"version": "1.3.1",
"zeroconf": ["_ipmi._tcp.local."]
}

0 comments on commit f82d159

Please sign in to comment.