Skip to content

Commit

Permalink
Merge pull request #177 from bretterer/fix-update
Browse files Browse the repository at this point in the history
Fix when latest hash is empty on update entity
  • Loading branch information
natekspencer authored Sep 18, 2024
2 parents 37e3332 + fcb4730 commit b04cb5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/rivian/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def _update_version_info(self) -> None:
if (latest_version := self._get_value("otaAvailableVersion")) == "0.0.0":
latest_version = current_version
current_hash = self._get_value("otaCurrentVersionGitHash")
latest_hash = self._get_value("otaAvailableVersionGitHash")
if (latest_hash := self._get_value("otaAvailableVersionGitHash")) == "":
latest_hash = current_hash
show_hash = (current_version, current_hash) != (latest_version, latest_hash)

self._attr_installed_version = current_version + (
Expand Down

0 comments on commit b04cb5b

Please sign in to comment.