* Normalize SI unit prefixes in distribution card proportions
* Extract SI prefix normalization to shared utility with tests
Moves normalizeValueBySIPrefix to src/common/number/ so it can be
reused. Replaces the inline method in the distribution card and the
switch statement in getPowerFromState (energy.ts).
* add formatEntityStateToParts
* add formatEntityStateToParts
* use formatEntityStateToParts
* add formatEntityStateToParts
* use formatEntityStateToParts
* add formatEntityStateToParts
* add formatEntityStateToParts
* add computeStateDisplayToParts
* update for monetary
* fix a test for monetary
* fixed test for monetary
* do not include "order" into result
* do not include "order" into result
* do not include "order" into result
* do not include "order" into result
* do not include "order" into result
* do not include "order" into result
* do not include "order" into result
* simplify
* ensure less conflicts in future merges
* Refactor monetary computing
---------
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
When HistoryStream.processMessage() prunes expired history and preserves
the last expired state as a boundary marker, it updates lu (last_updated)
but not lc (last_changed). Chart components use lc preferentially, so
when lc is present the boundary point gets plotted at the original stale
timestamp far to the left of the visible window. Delete lc from the
boundary state so the chart uses the corrected lu timestamp.
* Add "Commands" title to quick bar translations in English
* Enhance QuickBar dialog handling and localize commands title
* add nav icons
* Add icons and styles and separate navigation from commands
* handle non admin
* Add areas
* Fix import and shortcuts
* Restructure
* remove area sort
* move keys
* area search keys review
* Fix adaptive dialog slots without header
* Design review
* Review marcin
* Fix safe area bottom
* Fix ios focus
* Make it clearable
---------
Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
* Switch energy now chart to watts
* Add kW
* Scale formatted value based on powers of 1000
1000 W -> 1 kW
W → kW → MW → GW → TW
* Explainers
* Use 3 dp for kW+ and 0 for W
* Add non-integer test
* Save default panel in user data
* Change logic for default panel
* Fix types
* Fix typings
* Fix user and local storage
* Use user data and system data
* Update url path and update dashboard settings
* Fix tests
* Wait for panels and user/system data to be loaded
* Update comment
* Update comment
* Set empty object instead of null
* Update comment
* Feedbacks
* Apply suggestions from code review
* format
---------
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Add time-based conditional visibility for cards
* Move clearTimeout outside of scheduleUpdate
* Add time string validation
* Add time string validation
* Remove runtime validation as config shouldnt allow bad values
* Fix for midnight crossing
* Cap timeout to 32-bit signed integer
* Add listener tests
* Additional tests
* Format
* Setup base animation styles
* Add fade out to launch screen
* Cleanup
* Set opacity before removing element
* Remove
* Final
* Use computed duration for timeout
* Add skip animation prop
* Swap
* Use common function and fix issue
Change the fallback for null floor levels from 0 to 9999, ensuring floors
without a defined level appear at the bottom when sorted (after all numbered
floors, including negative basement levels).
This matches the original intent from #20206 which added support for floors
without levels.
* Add support for button card, glance card and entities card
* Add tests
* Add support for attribute and button row
* Add support to heading badge
* Undo changes from rows
* Add comment
* data/floor_registry: Fix `floorCompare()` argument type
* data/floor_registry: Add test suite for `floorCompare()` fn
* data/floor_registry: Add level-based sorting to `floorCompare()`
Update `floorCompare()` to include level-based sorting between custom order
and name sorting, matching the pattern used in the `getFloors()` helper.
Sort priority:
1. Custom order (if provided)
2. Floor level (lower levels first, with 0 fallback for null)
3. Floor name (alphabetical)
This makes `floorCompare()` consistent with the floor sorting logic used
throughout the codebase and prepares it for actual use.
* areas-strategy-helper: Use `floorCompare()` in `getFloors()` helper
Replace duplicated floor sorting logic in `getFloors()` with the
centralized `floorCompare()` function, matching the pattern used
for areas with `areaCompare()`.
This eliminates code duplication and ensures consistent floor sorting
across the codebase.
* data/area_floor: Use `floorCompare()` in `getAreasAndFloors()`
Replace duplicated floor sorting logic in `getAreasAndFloors()` with
`floorCompare()`, passing `haFloors` directly since it's already in
the correct format (Record<string, FloorRegistryEntry>).
This ensures consistent floor sorting across the codebase.
* Fix entity UI crash from undefined entity names (fixes#25363)
* Fix mock function type compatibility in test
- Update mock to handle string | undefined parameter
- Maintain test functionality while satisfying type checker
* Simplify approach based on reviewer feedback
- Use String() coercion to preserve numeric entity names (e.g., power strip outlets)
- Single line change instead of complex type validation across multiple files
- Revert stripPrefixFromEntityName to original (no longer needs null handling)
- Remove separate test file, update existing test to expect stringified numbers
- More conservative approach that preserves data rather than replacing with fallbacks
* Add ip sort method to compare helper
* Add ip sort functionality to dhcp config panel datatable
* Add type ip to DataTableColumnData
* Change ip sorting to padStart method for better readablity
* Rename ip compare method to clarify ipv4
* Enhance IP compare method to include ipv6
* Add compare IP test