Skip to content

Add support for update entities#12059

Merged
balloob merged 13 commits intodevfrom
update-domain
Mar 22, 2022
Merged

Add support for update entities#12059
balloob merged 13 commits intodevfrom
update-domain

Conversation

@ludeeus
Copy link
Copy Markdown
Member

@ludeeus ludeeus commented Mar 16, 2022

Breaking change

Proposed change

For home-assistant/core#68248
Preview https://62399243fc89eb000a079abd--home-assistant-gallery.netlify.app/#more-info/update

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

zsarnett
zsarnett previously approved these changes Mar 16, 2022
Co-authored-by: Zack Barett <zackbarett@hey.com>
@ludeeus ludeeus added the needs design preview PRs with this label will trigger a GitHub action to generate a gallery preview label Mar 16, 2022
"ui.dialogs.more_info_control.update.latest_version"
)}
</div>
<div class="value">${this.stateObj.attributes.latest_version}</div>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we render a placeholder if no latest version available ? Same with current version that can be null according to type.

Copy link
Copy Markdown
Member Author

@ludeeus ludeeus Mar 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!, have a suggestion on what that should be?
localise('state.default.unknown')?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do unavailable

this.hass.callService("update", "install", {
entity_id: this.stateObj!.entity_id,
backup: this._shouldCreateBackup,
version: supportsFeature(this.stateObj!, UPDATE_SUPPORT_SPECIFIC_VERSION)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an update entity supports specific version, can we not pass null to pick last version automatically?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why we can't, I'll test that out and adjust.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we don't have to pass it.

balloob
balloob previously approved these changes Mar 22, 2022
Copy link
Copy Markdown
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@balloob balloob merged commit bdde526 into dev Mar 22, 2022
@balloob balloob deleted the update-domain branch March 22, 2022 17:23
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed needs design preview PRs with this label will trigger a GitHub action to generate a gallery preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants