Skip to content

Commit

Permalink
Modify the way the update shows available updates (#20773)
Browse files Browse the repository at this point in the history
* Modify the way the update shows available updates

* Update src/data/update.ts

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>

* Update src/data/update.ts

* Update src/translations/en.json

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
  • Loading branch information
nielsnl68 and piitaya committed May 22, 2024
1 parent 19f94ff commit a500b58
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/data/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const checkForEntityUpdates = async (

// When updating, and entity does not support % show "Installing"
// When updating, and entity does support % show "Installing (xx%)"
// When update available, show the version
// When update available, show "Update available"
// When the latest version is skipped, show the latest version
// When update is not available, show "Up-to-date"
// When update is not available and there is no latest_version show "Unavailable"
Expand Down Expand Up @@ -191,10 +191,6 @@ export const computeUpdateStateDisplay = (
}
return hass.localize("ui.card.update.installing");
}

if (attributes.latest_version) {
return attributes.latest_version;
}
}

return hass.formatEntityState(stateObj);
Expand Down

0 comments on commit a500b58

Please sign in to comment.