* Add activity detail dialog
* Apply review fixes to activity detail dialog
* Resolve previous state from history in logbook detail dialog
* Disable text selection on clickable logbook rows
* Document run discovery as a fallback for missing context ids
* Scope the detail chain to the subject's cause path
* Replace clickable logbook rows with explicit detail affordances
* Show the cause badge on automation and integration rows
* Map scheduled and Home Assistant causes to their trigger icons
* Replace logbook detail affordances with full-width rows
* Frame the activity detail dialog with ha-grouped-list
* Add missing import
* Fix milliseconds placement in activity chain times
* Add child devices to the device registry
Child devices arrive over the WebSocket as stripped entries in the flat
config/device_registry/list response (discriminated by the absence of
full-device fields). Resolve them into complete DeviceRegistryEntry
objects at ingestion so hass.devices only ever holds full entries and the
~200 downstream consumers stay unchanged:
- config-entry association comes from the child's own config_entry_id, so
children still appear under their integration;
- hardware/display fields are inherited from the parent device;
- connections/via_device_id are not inherited.
Adds parent_device_id and the new "device" disabled_by value to the types.
Frontend data layer for home-assistant/core#178666.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Resolve child device effective area in the UI
A child device without an area of its own inherits its parent's area,
mirroring core's async_get_effective_area_id. getDeviceArea now takes the
devices map and falls back to the parent, so children show in the parent's
area everywhere a normal device would: the device dashboard (area column,
grouping and filtering via computeDeviceAreaLabel) and the device page
header.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Address review on child devices data layer
- Discriminate stripped child entries on `connections` (present on every full
device, never on a stripped child) instead of the deprecated `config_entries`
compatibility field that core plans to remove.
- Make getDeviceArea's `devices` argument required and update all callers, so a
child device's effective (inherited) area is resolved consistently everywhere,
including the device picker's selected-value renderer and the integration
device rows.
- Lock the enable switch in the device settings dialog when a device is disabled
by its parent (disabled_by "device"); core ignores enabling a child while its
parent is disabled.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Inherit the parent device area when resolving entity areas
Extract getDeviceAreaId so an entity on a child device resolves to the child's
effective area (the parent's area when the child has none), matching core's
entity area resolution. Applies to both getEntityAreaId and
getEntityEntryContext, which previously read device.area_id directly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* Unify back navigation across subpages
* Address back navigation review findings
* Fix state
* Add missing back path
* Remove back path from editors to fix unsaved changes prompt
* Use more specific back fallback paths
* Cleanup some toggle behavior
* fix tests
* prior behavior did not consider off
* Revert "prior behavior did not consider off"
This reverts commit 59cc93d308.
* Attempt rearranging features to address bundle growth failure
* Revert a no-longer-needed change to setup.ts
* Add test
* test
* Apply suggestion from @MindFreeze
---------
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Don't present toggle as a ui_action option for untoggleable entities
* Fix climate enums
* unmemoize
* fix test
* Add button/valve to canToggleDomain
The consume* decorators paired @lit/context's @consume({ subscribe: true })
with @transform to narrow a context down to a single value. ContextConsumer
calls host.requestUpdate() on every provider notification, so every consumer
ran an (often empty) render cycle on every unrelated statesContext change.
Replace the built-in consumer with a small reactive controller that subscribes
the same way but leaves update scheduling to the property setter, which already
gates on hasChanged. A render is now requested only when the selected value
actually changes.
* 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
The gauge card reads its display value from the formatted state parts.
A monetary value is split into multiple value parts around the currency
symbol, so the minus sign lands in its own part. Taking only the first
value part meant a value like -182.95 GBP rendered as just "-".
Join all value parts so the full number is shown again.
Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
* Preserve unchanged entity display entries across registry updates
* Compare all display fields (integration reload can change source-defined ones)
* Use a generic preserveUnchangedRecord helper with deepEqual
formatNumberToParts, the engine behind formatNumber, built a new
Intl.NumberFormat on every call. It is invoked for essentially every
numeric state render, and constructing an Intl.NumberFormat is
comparatively expensive.
Cache the formatters in a Map keyed by (locale, options). Unlike the
single-entry memoizeOne used for the date formatters, the number format
options are derived per value, so a multi-entry cache is needed to avoid
thrashing. The number of distinct combinations is small and bounded in
practice. Output is unchanged.
When the async Clipboard API is unavailable or rejects, copyToClipboard
falls back to a hidden textarea and execCommand. It appended that textarea
to deepActiveElement()?.getRootNode(). When the deepest active element
lives in the light DOM, getRootNode() returns the Document node, and
appending an element to a Document throws HierarchyRequestError (only the
single documentElement is allowed), so the fallback copy silently failed.
Append to document.body when the resolved root is a Document. Shadow roots
and elements keep holding the textarea directly, preserving execCommand
behavior inside dialogs that trap focus.
* 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>
* 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>