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.
* 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
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.
* 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 issues with develop and serve
* fix get image data, use hassUrl
* save picture-upload
* Update bundje.cjs
* Prettier
* Fix profile picture in dev serve mode
* person badge too
---------
Co-authored-by: Wendelin <w@pe8.at>