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

Add energy validation UI #9802

Merged
merged 10 commits into from
Aug 18, 2021
Merged

Add energy validation UI #9802

merged 10 commits into from
Aug 18, 2021

Conversation

balloob
Copy link
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
Member

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

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

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
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
Collaborator

Updated text
Configuration Energy alerts

@balloob
Copy link
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
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
@@ -1079,6 +1080,42 @@
"dialog": {
"selected_stat_intro": "Select the entity that represents the device energy usage."
}
},
"validation": {
Copy link
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.

src/translations/en.json Outdated Show resolved Hide resolved
@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.

None yet

5 participants