Skip to content

Commit

Permalink
Profile setting backwards compatible (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sholofly authored Oct 26, 2024
1 parent 9b5a690 commit 0b0a904
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion custom_components/lghorizon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,17 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
if CONF_REFRESH_TOKEN in entry.data:
refresh_token = entry.data[CONF_REFRESH_TOKEN]

profile_id = None
if CONF_PROFILE_ID in entry.data:
profile_id = entry.data[CONF_PROFILE_ID]

api = LGHorizonApi(
entry.data[CONF_USERNAME],
entry.data[CONF_PASSWORD],
COUNTRY_CODES[entry.data[CONF_COUNTRY_CODE]],
telenet_identifier,
refresh_token,
profile_id=entry.data[CONF_PROFILE_ID],
profile_id=profile_id,
)
await hass.async_add_executor_job(api.connect)
hass.data.setdefault(DOMAIN, {})
Expand Down
2 changes: 1 addition & 1 deletion custom_components/lghorizon/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"requirements": [
"lghorizon>=0.7.4"
],
"version": "0.6.4"
"version": "0.6.5"
}

0 comments on commit 0b0a904

Please sign in to comment.