Skip to content

Statistics graph card editor: add sub editor#52182

Open
ildar170975 wants to merge 9 commits into
home-assistant:devfrom
ildar170975:stat-graph-sub-editor
Open

Statistics graph card editor: add sub editor#52182
ildar170975 wants to merge 9 commits into
home-assistant:devfrom
ildar170975:stat-graph-sub-editor

Conversation

@ildar170975
Copy link
Copy Markdown
Contributor

Breaking change

Proposed change

A further development for #51824.
SubEditor added for a statistics entry - allows to select a statistics_id, name, color.

A possible improvement - adding a new type for sub-element-editor, otherwise we have that "Entity row editor" label for Statistics Graph card, History Graph card, Map card....

Screenshots

изображение изображение

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

Additional information

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

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • I have followed the perfect PR recommendations
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

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

To help with the load of incoming pull requests:

@ildar170975 ildar170975 changed the title Stat graph sub editor Statistic graph card editor: add sub editor May 23, 2026
@ildar170975 ildar170975 changed the title Statistic graph card editor: add sub editor Statistics graph card editor: add sub editor May 23, 2026
@ildar170975 ildar170975 marked this pull request as ready for review May 23, 2026 19:45
Comment thread src/panels/lovelace/editor/config-elements/hui-statistics-graph-card-editor.ts Outdated

private _valueRenderer: PickerValueRenderer = this._makeValueRenderer();

private _editItem(ev) {
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.

Suggested change
private _editItem(ev) {
private _editItem(ev: HASSDomEvent<StatisticElementChangedEvent>) {

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.

Not sure this is the right type but please put some type on the event

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>

@query("ha-generic-picker") private _picker?: HaGenericPicker;

@property({ attribute: "can-edit", type: Boolean }) public canEdit?;
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.

Suggested change
@property({ attribute: "can-edit", type: Boolean }) public canEdit?;
@property({ attribute: "can-edit", type: Boolean }) public canEdit?: boolean;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants