* Add manufacturer, model, and model_id filtering to entity selector
* Implement suggestion from review
* fix: simplify device data type
* Nest device filtering under `device` key in entity selector
* Fix race condition when fetching data
* Avoid config entries refetch loop on fetch failure
The catch handler reset _fetchedConfigEntries to false while also
assigning _configEntries, which re-rendered the component and re-armed
the fetch guard in updated() — an unbounded, no-backoff retry loop on
persistent failure. Keep the flag set so a failed fetch is not retried
on every re-render; the connection-change handler still retries on
reconnect.
---------
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
Add a "Frequencies" column to the radio frequency devices (proxy) list so
users can see which frequency bands each transmitter supports. The supported
frequency ranges are formatted into a human-readable, locale-aware string
(picking Hz/kHz/MHz/GHz automatically) with a helper in the data layer.
Claude-Session: https://claude.ai/code/session_01SYyMTtBdrt7EBrVEt869Uw
Co-authored-by: Claude <noreply@anthropic.com>
* Use related context in entity picker
* Include current item in context builder
* Fix
* Add tests
* Remove comment
* Support area context in card
* Add from rebase
* Add window.haContext.related to tests
A state condition with match "any" joins its entities with "or", but the
summary kept a plural verb for multiple entities, reading "If A or B are
on". With "or" English uses singular agreement: "If A or B is on". The
match "all" case joins with "and" and correctly stays plural.
Nest a select on a new matchAny flag inside the multiple-entities plural
branch so the verb agrees with the join. Other languages keep their
count-based plural (the extra argument is ignored). Add a test that renders
the actual en.json string to lock in the grammar.
* Redesign the Activity (logbook) as a timeline with entity context
* Update color
* Refine logbook timeline layout and entry rendering
- Three layout modes in ha-logbook-entry: wide (entity → state inline),
compact (entity/state + context/time), inline (state + cause icon + time)
- Entity name bold in wide and compact modes, consistent with tile card
- Cause icon shown inline next to the time in inline (single-entity) mode
- Unavailable state rendered as an empty circle dot
- Flash icon for entity-triggered causes
- "Show more" chevron link in logbook card, device page, and area page
- Extract _renderWide / _renderCompact / _renderInline from render()
- Scope entity-name flex layout to .line1 > .entity-name (compact only)
Co-Authored-By: Paul Bottein <paul.bottein@gmail.com>
* Show cause icon in inline logbook entries
- Show cause icon (user avatar, trigger type, integration brand) next to
the time in single-entity inline mode
- Use ha-trigger-icon for trigger-platform causes
- Use ha-domain-icon with brand-fallback for integration causes when
context_domain is available, falling back to mdiPuzzle
- Tooltip with cause name on hover
- Icon size 18px, user avatar 18x18px
Co-Authored-By: Paul Bottein <paul.bottein@gmail.com>
* Adjust cause icon sizes: 18px standalone, 16px inline with text
Co-Authored-By: Paul Bottein <paul.bottein@gmail.com>
* Fix somes issues
* Refine logbook timeline rendering
* Fix logbook dot alignment, header link, and graph colors
* Use deterministic colors for select/input_select in logbook timeline
Assign colors by options list index instead of encounter order so
logbook dots always match the history chart colors, regardless of JS
chunk boundaries.
* Add relative time to logbook entries
Show short relative time alongside absolute in all layouts.
Cause moves to its own third line in compact when icon mode is active.
* Replace dual time display with click-to-toggle in logbook
Clicking any time value toggles between absolute (default) and relative
short format. State lives in the renderer and propagates via Lit
re-render when shouldUpdate allows it.
Date headers now show "Today · June 15" and "Yesterday · June 14"
for recent dates via Intl.RelativeTimeFormat.
* Fix time toggle not updating entries in virtualizer mode
Use @queryAll to directly update showRelative on all visible entries
after toggling, covering the virtualizer case where Lit re-render
alone does not propagate prop changes to already-rendered items.
Also remove the !item guard in _renderRow to fix the RenderItemFunction<T>
type mismatch.
* Refine logbook compact/wide layout and cause display
- Move time column to the right in wide layout
- Right-align time in compact cause row by wrapping cause+trace in meta-main
- Hide cause icon/label for automation and script entries in compact/inline mode (only show trace link)
- Make automation/script entity name always clickable (opens more-info)
* Refactor logbook cause into typed kinds with text phrases
Replace the untyped `iconPath`/`triggerPlatform` fields on `LogbookCause`
with a `kind` discriminator (`user`, `automation`, `script`, `state`,
`scheduled`, `homeassistant`, `integration`).
In timeline layout, causes now render as readable text phrases
("By Paul", "By automation: Mode nuit", "By state change: Porte entrée",
"Scheduled", "Via HomeKit") with a `·` separator before "View trace".
Entity names in those phrases are clickable when an entity id is available.
In list/inline layout, the icon badge uses the kind to pick the right
icon (avatar, robot, script, brand domain, puzzle) — no trigger-type
icon component needed anymore.
* Add show-cause mode to logbook list layout
Add a `show-cause` boolean prop to `ha-logbook-entry`, `ha-logbook-renderer`,
and `ha-logbook` that switches list mode from a compact icon badge to a full
cause phrase on a third line.
The third line uses a fixed-width prefix span and a flex-1 truncatable entity
button so long automation/script/entity names ellipsize cleanly. The trace
link always stays right-aligned on the same line.
Enable the mode in `ha-panel-logbook` so the main activity feed shows full
cause context for every entry.
* Rename logbook model identifiers to match HA conventions and clean up
- Rename resolve*/build* → compute*, kind → type, LogbookWhat → LogbookValue,
model.what → model.value across model, renderer, and tests
- Merge EntryRenderCtx into LogbookRenderItem (extends LogbookItem) so layout
methods receive one flat object instead of ctx.model.xxx
- Inline _causeUser, drop dead possibleEntity branch in message formatter
- Remove unused .cause and .cause-name CSS classes; fix padding-block
inconsistency on timeline content
* Use ha-relative-time in logbook for auto-updating relative times
Replace the static relativeTime() string with <ha-relative-time> so the
displayed time updates every 60 s without a full re-render. Add a format
prop (Intl.RelativeTimeFormatStyle) to ha-relative-time to support the
short style needed by the logbook. Fix text-overflow ellipsis in the time
column by restructuring .time to use align-items: stretch with an inner
.time-content block that owns overflow/ellipsis, and display: contents on
ha-relative-time so its text participates in the parent's inline flow.
Also rename computeLogbookItem's internal param from item to entry to
avoid shadowing the outer item variable.
* Fix automation run value detection and timeline arrow display
User-triggered automation runs had context_user_id set but no source or
context_event_type, so isAutomationRun was false and the raw backend
message "triggered" (lowercase) was shown instead of the localized
"Triggered". Add context_user_id to the isAutomationRun check so all
automation runs get the proper localized value.
Restore the state arrow (→) in the timeline for all value.type === "state"
entries, including automation runs.
* Fix ha-relative-time interval and use textContent
The 60-second auto-update interval was never started when datetime is set
via Lit property binding, because connectedCallback runs before Lit sets
properties. Move the interval start/stop logic into update() watching the
datetime property change instead.
Also replace innerHTML with textContent since the relative time string is
always plain text.
* Remove comments
* Feedback
* Add deterministic fixtures and characterization tests for chart data processing
* Extract statistics chart data processing into a pure function
* Extract state history line chart data processing into a pure function
* Add benchmark suite for chart data processing
* Add chart data optimization playbook
* Point agent instructions at the chart optimization playbook
getEntities builds the item list over every entity each time an entity
picker, the quick bar, or a target picker opens. On a large installation
that list construction did avoidable per-entity work:
- the include/exclude entity and domain filters used Array.includes,
a linear scan per entity (O(entities x filter));
- computeRTL was recomputed for every entity although it only depends on
the language and translation metadata;
- domainToName (a localize lookup) was called for every entity even though
domains repeat heavily across entities.
Use Sets for the filters, hoist computeRTL out of the map, and cache the
domain name per domain. This speeds up opening pickers on large installs.
Behavior is unchanged. Add tests for getEntities, which had none.
* first rough draft of Z-Wave credential mangement
* separate user and credentials, error handling, dialog tweaks
* align with upstream API changes, improve error handling
* align more with Matter, use lock entity for services
* remove get_credential_status service
* address review feedback, clarify user types
* user_index -> user_id, fix some pending states
* address review feedback
* clean up unused code, strongly type credential types
* Clear -> Delete, drop icons
* Simplify flow to 1 PIN/Password credential per user
* cleanup, comments, etc.
* address review feedback
* do not show existing credential data
* fix lint errors after branch update
* ignore non-enterable credential types when editing user
* Add apps navigation group with ingress add-on panels
Add an "Apps" section to the navigation picker that shows all add-ons
with ingress support. Uses the /ingress/panels supervisor endpoint via
a cached collection to fetch add-on titles and icons in a single call.
https://claude.ai/code/session_01F8dUzfSWj8ZwDByVZ45BNj
* Fix no-shadow lint error for panels variable
Rename subscribe callback parameter from `panels` to `data` to avoid
shadowing the outer `panels` variable in _loadNavigationItems.
https://claude.ai/code/session_01F8dUzfSWj8ZwDByVZ45BNj
* Use subscribeOne helper for ingress panels collection
Replace hand-rolled Promise/subscribe/unsub pattern with the existing
subscribeOne utility for cleaner one-shot collection consumption.
https://claude.ai/code/session_01F8dUzfSWj8ZwDByVZ45BNj
* Add explicit type parameter to subscribeOne call
TypeScript cannot infer the generic type through the collection
subscribe chain, resulting in unknown type for panel entries.
https://claude.ai/code/session_01F8dUzfSWj8ZwDByVZ45BNj
* Add subscribeOneCollection helper for collection one-shot reads
Add a new subscribeOneCollection utility that takes a collection
directly instead of requiring the (conn, onChange) function pattern.
Use it in the navigation picker for cleaner ingress panel fetching.
https://claude.ai/code/session_01F8dUzfSWj8ZwDByVZ45BNj
* Use Collection type instead of custom Subscribable interface
https://claude.ai/code/session_01F8dUzfSWj8ZwDByVZ45BNj
* Add ingress panel support to subscribeNavigationPathInfo
* Use app panel variable
* Add tests
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
* Initial implementation of Matter lock pin management and events.
- Implement lock codes
- Implement lock events
- Implement lock schedules and guest codes
* Initial implementation of Matter lock pin management and events.
- Implement lock codes
- Implement lock events
- Implement lock schedules and guest codes
* Initial implementation of Matter lock pin management and events.
- Implement lock codes
- Implement lock events
- Implement lock schedules and guest codes
* - Copilot fixes
* - Requested improvements on how the UI screens render including:
- Cancel button location
- Alignment of delete icons and buttons
* Updates to support new PR for backend
* Update as per PR comments
* Fixes to align to new backend design.
* Fixes for user deletion
* Fixes for PR comments
* Delete test/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json
* Remove unused code
* Updates with review feedback
* PR Comments
* Fixed linting error
* Fixes for new dialog changes
* Added debugging for errors, aligning to other areas where this is used.
---------
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.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.
* 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>