1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-05-25 01:29:04 +01:00
Commit Graph

13042 Commits

Author SHA1 Message Date
Pascal Vizeli 7dbd6ae5a2 Add-on iframe: delegate microphone + camera Permissions Policy (#52068)
* Add-on iframe: delegate microphone + camera Permissions Policy

The add-on ingress iframe in ``ha-panel-app.ts`` ships without an
``allow=`` attribute, so the Permissions Policy default of *deny*
applies for ``microphone`` and ``camera`` on the cross-origin
iframe. An add-on that wants to call ``getUserMedia`` — voice
notes, dictation, video calls, photo capture — fails silently with
``NotAllowedError`` before the browser even surfaces the permission
prompt.

The failure is most visible on the Android Companion app, where
there's no "open in a new tab" escape: the user presses the mic
button and nothing happens, no toast, no logs.

Delegate ``microphone``, ``camera``, and ``clipboard-write`` to the
add-on iframe. Add-ons are first-party software the user explicitly
installs, and Chrome's runtime permission prompt still gates the
hardware access — the ``allow=`` attribute just lets the iframe
*request* the prompt instead of being blocked at the policy layer.

``clipboard-write`` is bundled in because the next-most-frequent
silent-fail in add-on land is ``navigator.clipboard.writeText`` for
"copy link" / "copy code" affordances, blocked by the same
mechanism.

* Sandbox add-on ingress iframe without allow-same-origin

Split IFRAME_SANDBOX into two constants: IFRAME_SANDBOX (without
allow-same-origin) for add-on ingress iframes that need origin
isolation, and IFRAME_SANDBOX_SAME_ORIGIN for external iframes
that need same-origin access.

This ensures add-on iframes can't inherit camera/microphone
permissions already granted to the Home Assistant origin, and
prevents same-origin iframes from removing their own sandbox.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-22 19:31:56 +02:00
Wendelin e1528d21b3 Migrate md-lists cloud dashboard and devtools (#52163)
Migrate lists in cloud and dev tools=
2026-05-22 18:24:16 +03:00
Jan-Philipp Benecke 313360701a Revamp ZHA group page UI (#52124) 2026-05-22 16:24:59 +02:00
Aidan Timson 8f76613068 Add more quick links to device page (#52137)
* Add more quick links to device page

* Move shared keys to common location
2026-05-22 12:45:37 +03:00
Aidan Timson 85dff6640a Use ha-list-nav for each section in device page related card (#52142)
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
2026-05-22 11:22:36 +02:00
Aidan Timson ab7c892b6b Add to for area page (#52141)
* Setup add to area page

* Remove 3 buttons, move to single add to button next to add a picture button

* Use normal size buttons

* Restructure layout with picture

* Remove div when both conditions are met

* Use mixin

* Fix imports
2026-05-22 12:02:38 +03:00
pcan08 1caf1d99b5 Migrate theme-picker to ha-generic-picker (#52067)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Wendelin <w@pe8.at>
2026-05-22 06:32:39 +00:00
Stefan Agner e0adb006b6 Show time zone picker in onboarding when browser can't resolve IANA zone (#52146)
Some environments (e.g. Android WebView/emulator) return a UTC offset like
"+00:00" from Intl.DateTimeFormat().resolvedOptions().timeZone instead of an
IANA zone name. Submitting that to saveCoreConfig fails with "invalid time
zone", leaving users stuck on the country step.

Detect this by checking the resolved value against the google-timezones-json
list used by ha-timezone-picker, and surface the picker on the core-config
step when no IANA zone could be detected from the browser or the location
detect API.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 08:26:50 +03:00
Aidan Timson 8856c26929 Add quick links to area page, add area query param support (#52133)
* Add quick links to area page

* Typing

* Add query param support for areas

* hint for the rest

* Add support for helpers

* Add counts
2026-05-21 18:59:20 +02:00
Wendelin 4a0fe3190c Backups: Migrate md-list to new list-base (#52136)
Migrate md-list to new list-base
2026-05-21 18:57:24 +02:00
karwosts 08f7e97462 Use display precision in statistic card (#52138) 2026-05-21 18:53:04 +02:00
Joakim Plate a5791c8c08 Switch to power-standby for media player (#52127) 2026-05-21 18:53:01 +02:00
Wendelin 6a98a74c58 Fix trigger time margin bottom (#52144)
Fix trigger time margin
2026-05-21 18:39:35 +02:00
Wendelin 58d4edaa63 Respect via device in device picker, device list (#52131)
* Respect via device in device picker

* Add context to device data table too
2026-05-21 16:01:43 +02:00
Wendelin 176841e647 Automation triggers - auto IDs (#52129)
* Add auto trigger ids

* improve

* Fix paste with no trigger id

* Fix trigger-id-chip and add jsdocs

* review
2026-05-21 16:52:03 +03:00
karwosts 7c6609aee7 Make external statistic card unclickable (#52139) 2026-05-21 16:07:43 +03:00
Paul Bottein 7048c5f3d2 Add entity-first card picker for dashboard (#51651)
Co-authored-by: Wendelin <w@pe8.at>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-05-21 15:01:10 +02:00
Aidan Timson 9ed47be6c3 Add to for devices page, merge 3 cards into 1 related card (#52119)
* Add to for devices page

* Rename and reuse original dialogs, drop popover

* Reduce

* Lazy context

* Direct access lazy context

* Default width

* Merge automations and scripts cards

* Format

* Loading state

* Rename key

* Tooltip and move key

* Copy icons used in more info

* Sort

* Merge scenes into one "Related" card

* Adjust

* Fix no labs

* Use same wording for device actions

* Cleanup

* Comments for removal

* Cleanup

* Type check

* Template literals

* Add padding
2026-05-21 15:35:14 +03:00
Aidan Timson 128f4526e3 Fix no entities message in area page, improve message (#52130) 2026-05-21 15:23:26 +03:00
Wendelin 3f1b7ce391 Add automation item comments (#52090)
* Add automation comments

* Line wrap

* Review

* Add truncateWithEllipsis with tests

* Review
2026-05-21 13:50:51 +03:00
Paul Bottein 86a24d1532 Add temperature and precipitation forecast card features (#51866)
* Rework weather forecast card features

* Add show labels option

* Some fixes

* Fixes and cleaning

* Update palette

* Add reference floor to precipitation bar scale

Light drizzle no longer fills the bar when it's also the period max.
Observed values above the floor still drive the scale (storms read full).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Feedbacks

* Use weather unit

* Force celcius for gradient

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 13:42:26 +03:00
Wendelin 46bab5bb01 Automation row target count (#52118)
* Add automation row target count

* fix types
2026-05-20 16:23:40 +03:00
iluvdata e8f486af0a Allow integrations to specify the "domain" of the entity that is rendered in previews (#51829)
* Allow previews to use a domain

* Allow previews to specify preview entity domain

* Allow repair_flow to use previews

* Pull recent changes

* Add domain to previews for TemplatePreview
2026-05-20 12:30:03 +03:00
AlCalzone 211579eade Add Z-Wave credential mangement (#51591)
* 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
2026-05-20 12:05:13 +03:00
markvp f6458925c9 Add hidden device firmware column (#52117) 2026-05-20 08:35:32 +00:00
karwosts ae5e35e7ed Include low battery binary_sensors in low battery count (#52115)
Include low binary battery sensors in low battery count
2026-05-20 08:35:11 +03:00
karwosts 8c1727859a Restore battery chips in Home areas strategy (#52114) 2026-05-20 08:27:12 +03:00
Wendelin 287562221f Remove live condition test tooltip (#52103)
* Remove live condition test hover

* Update src/components/automation/ha-automation-row-live-test.ts

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>

* Review

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
2026-05-20 08:21:45 +03:00
Aidan Timson 2593dfed8d Type assertion and signature improvements for hui changed handlers (#52109)
* Type assertion and signature improvements

* Improve
2026-05-19 20:06:20 +02:00
pcan08 2d92f1fb3b Forget filter from url: remaining pages (#52061)
* refactor: use separate storage and display filters in backup page

Apply the two-lists pattern in backup page: _filters (@state, display only) +
_storageFilters (@storage sessionStorage, state: false). _storageFilters
is only updated when not in URL mode (_fromUrl flag). Init moved from
connectedCallback to willUpdate(!hasUpdated).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: use separate storage and display filters in scenes page

Apply the two-lists pattern in scenes page: _filters (@state, display only) +
_storageFilters (@storage sessionStorage, state: false, with
serializer/deserializer). _storageFilters is only updated when not in
URL mode (_fromUrl flag). Init moved from firstUpdated to
willUpdate(!hasUpdated). The existing updated() hook already calls
_applyFilters() when _entityReg changes, covering the reconnect case.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: use separate storage and display filters in automations page

Apply the two-lists pattern in automations page: _filters (@state, display only) +
_storageFilters (@storage sessionStorage, state: false, with
serializer/deserializer). _storageFilters is only updated when not in
URL mode (_fromUrl flag). _fromUrl is set before the await in the async
_filterBlueprint() to prevent any user change during the fetch from
persisting. Init moved from firstUpdated to willUpdate(!hasUpdated).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: use separate storage and display filters in scripts page

Apply the two-lists pattern in scripts page: _filters (@state, display only) +
_storageFilters (@storage sessionStorage, state: false, with
serializer/deserializer). _storageFilters is only updated when not in
URL mode (_fromUrl flag). _fromUrl is set before the await in the async
_filterBlueprint() to prevent any user change during the fetch from
persisting. Init moved from firstUpdated to willUpdate(!hasUpdated).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: don't mix URL filters with storage filters in automation,script and scene pages

When URL params are present, _filters starts empty so URL methods build
from scratch. Previously, _filters was pre-populated from _storageFilters
and the spread in _filterLabel()/_filterBlueprint() would merge storage
filters into the URL-injected ones.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update src/panels/config/backup/ha-config-backup-backups.ts

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
2026-05-19 17:47:47 +00:00
pcan08 8cff4c6bd2 Helpers page: forget filter from url (#51989)
* fix(helpers): clear URL-injected filters on leaving helpers dashboard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(helpers): restore previous filters after URL-injected navigation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: use separate storage and display filters

Apply the same pattern as devices and entities pages: split _filters into
a display-only @state and a _storageFilters persisted to sessionStorage.
_storageFilters is only updated when not in URL mode (_fromUrl flag), so
URL-injected filters never persist to storage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: reapply filters when helper entities load on reconnect

_applyFilters() was never called when _filters was restored from
sessionStorage, leaving _filteredHelperEntityIds undefined and the
table appearing empty. Call it whenever _helperEntities updates and
active filters are present.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 19:43:31 +02:00
Aidan Timson eaecc76f36 Add to automation/script with triggers/conditions/actions (#51871)
* Setup default add to actions

* Setup default add to actions

* Move event into external only

* Split into sections

* Padding

* Refactor to single type and adapt app interface to frontend style and vice versa

* Refactor to single type and adapt app interface to frontend style and vice versa

* Condition action and navigation actions

* Open dialogs with trigger, condition, action dialogs

* Add divider before add to

* Move add to to the top

* Action

* Triggers and conditions labs feature check

* Suggestion

* Keep query state

* Change to automation_trigger

* Use typed key instead of finding with icon

* Apply suggestions from code review

Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>

* Finish

* Reset state

* Fix navigation resets

* stated

Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>

* Split

* Add import, sort imports

---------

Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
2026-05-19 14:57:44 +02:00
Aidan Timson 7dc0033c03 Improve typing on value-changed handlers in card features and state controls (#52107) 2026-05-19 14:28:52 +02:00
Paul Bottein 601e6d0542 Distinguish unknown from unavailable entity state (#52089) 2026-05-19 15:24:50 +03:00
Aidan Timson c7ca3dd837 Typing assertion and generic improvements on area controls and conditions (#52106) 2026-05-19 15:11:31 +03:00
Wendelin 950de204aa Restyle and improve app info (#52100) 2026-05-19 09:37:38 +01:00
Jan-Philipp Benecke 91b6a4c4b6 Migrate energy sources table and drop mwc data table dependency (#52097)
* Migrate energy sources table and drop mwc data table dependency

* Address review comments

* Address review comments
2026-05-19 09:58:18 +03:00
karwosts 643cc4ca7d Make energy electric sources nameable (#52051)
Make electric sources nameable

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
2026-05-19 06:37:49 +00:00
Paul Bottein 90028b2e22 Clarify cleaning order hint in vacuum more info (#52087) 2026-05-18 22:29:36 +02:00
Ben Hamilton (Ben Gertzfield) 914c48abd5 Allow media player source card feature when list is empty (#52094) 2026-05-18 19:05:12 +00:00
Marcin Bauer 4728eb7231 Remove arrow icon from continue on error indicator (#52092)
The arrow-right icon next to the alert icon was decorative noise.
With automation comments (#52090) adding yet another icon, simplify
to a single mdiAlertCircleCheck indicator.

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 17:28:14 +03:00
Wendelin 98525d23e6 Lovelace condition live test (#52027)
* Add lovelace condition live test

* Add live card status

* Add empty text
2026-05-18 15:01:56 +02:00
Petar Petrov ec98b21276 Highlight problematic devices in Energy Dashboard list (#52088) 2026-05-18 10:18:27 +01:00
Paulus Schoutsen defad3beca Treat media player unknown state like off instead of unavailable (#52080)
* Show both power buttons for assumed-state media players when unknown

Media players with assumed state report an unknown state when their
actual power state can't be determined. In that case the entity row and
more info should still expose both turn on and turn off controls so the
user can operate the device.

https://claude.ai/code/session_01JyZojNPCCY65HmRVQaASkG

* Treat media player unknown state like off instead of unavailable

The media player controls lumped the "unknown" state in with
"unavailable" and hid all controls. An unknown state is closer to "off":
the device exists but its power state isn't reported, which is common
for assumed-state players. Only "unavailable" should hide the controls,
so an unknown-state player now shows the turn on button (and both power
buttons when it has an assumed state) in the entity row and more info.

https://claude.ai/code/session_01JyZojNPCCY65HmRVQaASkG

* Adjust comments and variable placement for media player state check

https://claude.ai/code/session_01JyZojNPCCY65HmRVQaASkG

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-18 09:58:01 +03:00
Petar Petrov 635d61256b Fix Y-axis label precision in statistics and history charts (#52038) 2026-05-18 08:17:43 +02:00
pcan08 85b2ca377a Add sound mode filtering to media-player-sound-mode feature (#52058)
* feat(tile-card): add sound mode filtering to media-player-sound-mode card feature

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Attempt to fix CI lint error

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 15:41:46 +03:00
Simon Lamon e194247f50 Add percentage of battery state of charge (#52065)
Add percentage of battery soc
2026-05-17 15:40:42 +03:00
karwosts c79956b893 Dynamically compute overflow for ha-data-table-labels (#52069)
* Dynamically compute overflow for ha-data-table-labels

* update
2026-05-17 15:39:49 +03:00
pcan08 811397f740 Entities page: forget filter from url (#51988)
* fix(entities): clear URL-injected filters on leaving entities dashboard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(entities): restore previous filters after URL-injected navigation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: use separate storage and display filters

Apply the same pattern as devices page: split _filters into a display-only
@state and a _storageFilters persisted to sessionStorage. _storageFilters
is only updated when not in URL mode (_fromUrl flag), so URL-injected
filters never persist to storage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 08:55:18 +02:00
pcan08 0dfb801ff6 Devices page: forget filter from url (#51986)
* fix(devices): clear URL-injected filters on leaving devices dashboard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(devices): restore previous filters after URL-injected navigation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(devices): use separate storage and display filters

Replace the disconnect-callback approach with two distinct filter states:
- _storageFilters: persisted to sessionStorage, updated only when not in
  URL mode (manual filter changes and clear)
- _filters: display-only state, initialized from _storageFilters on first
  render, overwritten by URL params without touching storage

_storageFilters is frozen while _fromUrl is true, preserving the user's
previous manual filters for the next normal visit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 08:45:51 +02:00