Skip to content

Add energy validation UI#9802

Merged
balloob merged 10 commits intodevfrom
validation-ui
Aug 18, 2021
Merged

Add energy validation UI#9802
balloob merged 10 commits intodevfrom
validation-ui

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Aug 13, 2021

Breaking change

Proposed change

Show validation errors/warnings. Bare UI while waiting for better design.

Requires home-assistant/core#54567

image

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:

@bramkragten
Copy link
Copy Markdown
Member

This should also be added to the energy-setup-wizard

bramkragten
bramkragten previously approved these changes Aug 13, 2021
@matthiasdebaat
Copy link
Copy Markdown
Member

What does not defined mean and how can a user fix this? We can use an alert/warning bar, for example:

Configuration Energy alerts
https://www.figma.com/file/0yWK3l5paYugEgvp2GRsVN/Energy?node-id=598%3A4783

@ludeeus
Copy link
Copy Markdown
Member

ludeeus commented Aug 17, 2021

What does not defined mean and how can a user fix this?

When you have defined an entity that does not exist, it's fixed by:

  • Getting the integration that provides the entity to work again (in case of a broken integration)
  • Replacing it with a valid existing entity (in case of a removed entity)

@matthiasdebaat
Copy link
Copy Markdown
Member

Updated text
Configuration Energy alerts

@balloob
Copy link
Copy Markdown
Member Author

balloob commented Aug 17, 2021

Backend and UI updated to match design:

image

bramkragten
bramkragten previously approved these changes Aug 18, 2021
import { EnergyValidationIssue } from "../../../../data/energy";
import { HomeAssistant } from "../../../../types";

@customElement("ha-energy-validation-result")
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.

Give the file (and class) the same name

@balloob balloob changed the title Add basic validation UI Add energy validation UI Aug 18, 2021
"selected_stat_intro": "Select the entity that represents the device energy usage."
}
},
"validation": {
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.

@matthiasdebaat here are all the validation errors that we can show with their title/description.

@balloob balloob merged commit b802a41 into dev Aug 18, 2021
@balloob balloob deleted the validation-ui branch August 18, 2021 19:59
@github-actions github-actions bot locked and limited conversation to collaborators Aug 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants