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 configuration to default dashboard #18658

Merged
merged 10 commits into from
Nov 22, 2023
Merged

Conversation

piitaya
Copy link
Member

@piitaya piitaya commented Nov 14, 2023

Proposed change

Strategy editor

Adds UI editor for strategies. The user can switch between UI and yaml to edit the strategy configuration. If the strategy doesn't provide editor, it will be yaml only.

Default dashboard improvements

Add 3 options to default dashboard :

  • hidden_areas : List of areas that must not be displayed
  • hide_entities_without_area: Entities without area will not be listed
  • hide_energy: Hide the energy card

Demo

CleanShot.2023-11-15.at.15.53.07.mp4

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:

@piitaya piitaya marked this pull request as draft November 15, 2023 14:31
@balloob
Copy link
Member

balloob commented Nov 15, 2023

Instead of hidden areas, could we have a single area selector component that allows:

  • enable/disable area (current hide functionality)
  • re-order area

I am sure that this will become useful for many other strategies too.

@piitaya
Copy link
Member Author

piitaya commented Nov 15, 2023

Yep definitely! We already discussed about a better UX for areas during frontend meeting 🙂
If we use an included list, new areas will not be automatically added.

I think we need two lists to store it:

areas:
  hidden: 
    - kitchen 
    - bedroom
  ordered:
    - living_room
    - bathroom

So if the user create a new area. It will add it at the end of the visible areas list.

But the selector will only display an ordered visible list so it's easier for the user.

@piitaya piitaya marked this pull request as ready for review November 15, 2023 21:23
@balloob
Copy link
Member

balloob commented Nov 15, 2023

Yeah that sounds about right, and I guess that means that we can also add that in a future PR. Should we then already adopt the YAML format in your comment (top level areas with 2 sub-keys) to avoid having to reuse hidden_areas key in the future? (assuming selectors only work on 1 key)

src/translations/en.json Outdated Show resolved Hide resolved
@piitaya piitaya force-pushed the default_dashboard_options branch 2 times, most recently from a549664 to f989038 Compare November 20, 2023 08:31
@piitaya piitaya marked this pull request as draft November 21, 2023 13:32
@piitaya piitaya force-pushed the default_dashboard_options branch from f989038 to 182eb1a Compare November 21, 2023 13:32
@piitaya piitaya marked this pull request as ready for review November 22, 2023 11:03
@bramkragten bramkragten merged commit 270d463 into dev Nov 22, 2023
13 checks passed
@bramkragten bramkragten deleted the default_dashboard_options branch November 22, 2023 11:40
@frenck frenck added the Noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) label Nov 22, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed Noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants