Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Hass.io add-on options to YAML #4717

Merged
merged 3 commits into from Feb 3, 2020
Merged

Conversation

balloob
Copy link
Member

@balloob balloob commented Feb 1, 2020

Breaking change

Proposed change

Converts hassio add-on options to YAML. Show error if it's invalid.

Screen Shot 2020-01-31 at 22 43 24

Fixes #4622

@bramkragten I made some changes to ha-yaml-editor that we need to validate in other places:

  • Only call setValue on firstUpdated if it's defined. I ended up running into a race condition where value from parent was being overridden by firstUpdated. We should really rename this property to defaultValue, because it's only used on initial initialization. It's not used after that.
  • Always fire value-changed if the value changed, even if it's invalid and so the value is actually not the same as the entered value. We read the isValid option from the editor on value changed to be able to show an error.

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:
  • 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:

@balloob balloob added the Supervisor Related to the supervisor panel label Feb 1, 2020
@bramkragten bramkragten merged commit 24c591f into dev Feb 3, 2020
@delete-merged-branch delete-merged-branch bot deleted the hassio-addon-options-yaml branch February 3, 2020 10:06
@lock lock bot locked and limited conversation to collaborators Feb 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed Supervisor Related to the supervisor panel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid JSON in the add-on options is no longer shown
3 participants