* Use same now() time for all entity state values
Otherwise if there is a slight time lag while each statistic is processed, some of the points go missing from the tooltip. There end up being to very closely spaced time points for each different entity.
* Fix initial statistics graph card metadata loading
When using energy collection mode, the metadata for statistic entities was not always being loaded when the charts were first created. This could be seen in the graph units when they had differing unit (e.g. kW and W mixed).
* Re-create form editor when schema changes in hui-form-element-editor
When a parent component passes a new schema to hui-form-element-editor
(e.g. with updated disabled flags after an entity change), the internal
hui-form-editor was not rebuilt because loadConfigElement() short-circuits
once the config element exists. This meant dynamic schema changes were
silently ignored.
Override updated() to detect schema changes after initial load, tear down
the stale config element via unloadConfigElement(), and re-set the value
so the normal load path recreates the form with the current schema.
Fixes#29776
* Fix prettier formatting in hui-map-card.ts
Pre-existing formatting issue on dev branch.
* Propagate schema changes to existing form editor element
When the schema property on hui-form-element-editor changes (e.g. because
the selected entity changed and disabled flags need updating), directly
update the schema on the already-created hui-form-editor config element.
Previously, unloadConfigElement() was tried but caused a visible flash
(editor going blank then reappearing), and re-setting value with a spread
object was tried but deepEqual considers it unchanged, short-circuiting
the reload.
The fix is minimal: make _configElement protected in HuiElementEditor so
the subclass can reach it, then in the updated() hook push the new schema
directly onto the existing element — no teardown, no re-creation.
* Convert energy panel to use a dashboard strategy
Move the view-selection logic from ha-panel-energy into a dedicated
energy dashboard strategy, consistent with how home/areas/map dashboards
work. The strategy decides which view strategies (electricity, gas,
water, power, overview) to show based on energy preferences.
Extract shared constants into a separate module to avoid circular
dependencies between the panel and view strategies.
* Remove unused energy collection constants from ha-panel-energy
* date-range-picker with cally
* fix timePicker
* Review: backdrop transition
* fix comments
* Add formatCallyDateRange
* Refactor date formatting in date range picker and remove unused styles
* time-input without label
* review
* Use isExternalStatistic helper for consistency
* Remove redundant if condition
We have `band = drawBands && ...`, so there is no point checking if `drawBands` is true inside `if (band && ...)`.
* Skip plotting state value on statistic graph if units mismatch
For example plotting a *F sensor on a *C chart - statistic data will be converted to *C, but the state value will still be in *F so the displayed point is wrong. Similarly if plotting a kW sensor on a W chart, the same is true - statistics get converted to W by recorder, but the state value would still be in kW. In other words the plotted state point is complete nonsense.
If the units of the statistic state don't match the units of the graph, we should not be displaying the value on the graph.
* Remove redundant this.unit check
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
---------
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Refactor device entities card to use Lit directive for entity rows
Replace the imperative pattern (shouldUpdate hack, _entityRows array,
_renderEntity pushing elements) with a declarative approach using a
reusable Lit directive and repeat for stable keying.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix function name and padding issue
* Recreate on domain change, otherwise update
* Prettier
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Add entity name alias toggle and drag-to-reorder aliases in voice settings
* Fix reorder
* Update src/panels/config/voice-assistants/entity-voice-settings.ts
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Use map instead of repeat
* Improve key
---------
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Add scrollbar support for cards with fixed grid row height
* Fix default sizing
* Add warning for card that doesn't support resizing well
* Remove not used explanation
* Preserve entity unit_of_measurement in gas and water flow rate badges
The gas and water total badges on the energy dashboard Now tab previously
converted all flow rate values to L/min and then formatted them as either
L/min or gal/min based on the unit system. This meant entities reporting
in m³/h or other units always displayed incorrectly.
Now the badges preserve the unit_of_measurement from the entities. If all
entities share the same unit, the raw values are summed directly. If they
differ, values are converted through L/min as an intermediate and displayed
in the first entity's unit.
* Extract shared computeTotalFlowRate to energy.ts
* Rescale Y-axis on chart zoom via custom AxisProxy filterMode
Patch ECharts' AxisProxy.filterData to support a "boundaryFilter" mode
that keeps the nearest data point outside each zoom boundary while
filtering distant points. This lets ECharts natively rescale the Y-axis
to the visible data range without causing line gaps at the zoom edges.
* Add tests for ECharts AxisProxy patch internals
Verify that the ECharts internals our boundaryFilter patch relies on
still exist (filterData, getTargetSeriesModels on AxisProxy prototype),
and test the patch behavior: delegation for other filterModes, early
return for non-matching models, and correct boundary-preserving filtering.
* Update comment