* Add activity log sidebar to security dashboard
Add a sidebar with a logbook card to the security domain dashboard,
filtered by security entities (cameras, locks, alarm panels, covers,
binary sensors) and person entities. The sidebar uses the sections view
sidebar layout with mobile tab support for switching between devices
and activity views on narrow screens.
https://claude.ai/code/session_01MCjuARQfuyowAbJ9fwiEnH
* Update src/panels/security/strategies/security-view-strategy.ts
* remove import
* Set max column to 3 and fix title margin
* Type fix
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
* Auto-refresh serial ports every 5s in serial selector
Schedules the next fetch via setTimeout once the previous response
resolves, so slow responses don't stack requests. Refreshing is
stopped when the element is disconnected and restarted on reconnect.
* Refresh serial ports only while picker dropdown is open
Emit a picker-opened event from ha-generic-picker and use it in the
serial selector to drive a 5s refresh loop that only runs while the
dropdown is open. The initial load still happens on firstUpdated so
the dropdown has data when the user opens it.
* Allow refreshing picker items while dropdown is open
ha-picker-combo-box caches its items on first update, so the serial
selector's auto-refresh had no effect while the dropdown was open.
Add a public refreshItems() method to re-run getItems and update the
visible list, expose it through ha-generic-picker, and call it from
the serial selector after each refresh.
* Format with prettier
* Categorize serial ports and improve item display
Group ports by type in the serial selector dropdown — integration-provided
(URI-schemed like esphome://), USB (vid/pid), built-in, and unnamed local
ports — with a section header and filter chip for each. Within each section
items are sorted by product name, and unnamed ports (no description or
manufacturer) fall to the last section so they only appear when they
actually exist, which is mostly in dev environments.
Item display now leads with the product description and manufacturer; the
device path, vid:pid, and serial number move to a less prominent secondary
line. ESPHome entries show the ESPHome logo, other integration-provided
ports get a generic connection icon, USB ports a USB icon, and embedded
ports a memory chip icon.
* Rename Unnamed serial port category to Other
* Rename serial selector to serial_port selector
Updated the selector key from `serial` to `serial_port`, renamed the
class to HaSerialPortSelector / SerialPortSelector and the custom
element to `ha-selector-serial_port`, moved translations under
`ui.components.selectors.serial_port`, and renamed the file to
`ha-selector-serial-port.ts`.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Add use_entity_picture option to picture-entity card
Allow picture-entity cards to display the entity's entity_picture attribute instead of requiring a manually configured image URL. This is particularly useful for entities that dynamically set their entity_picture (e.g., update entities showing component logos, custom integrations, etc.).
The static image configuration remains as a fallback when the entity_picture attribute is not present or when use_entity_picture is not enabled.
Changes:
- Add use_entity_picture boolean option to PictureEntityCardConfig
- Implement logic to check entity_picture attribute when enabled
- Update validation to accept use_entity_picture as valid image source
- Add editor toggle with helper text
- Add translation strings for the new option
* Rename use_entity_picture to show_entity_picture and add entity_picture_local support
Address review feedback:
- Rename use_entity_picture to show_entity_picture to match tile card and badge naming
- Check entity_picture_local first before entity_picture, following tile card pattern
- Update all references in types, card implementation, editor, and translations
* Fix TypeScript error for entity_picture_local access
* Address review feedback - less technical formulation
* Drop unnecessary cast in picture-entity card
Widen stateObj to HassEntity so entity_picture_local is accessible
without an inline cast, matching the tile-card pattern.
---------
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
The supervisor_* My redirects (supervisor_store, supervisor_addons,
supervisor_app, supervisor_addon, supervisor_add_addon_repository) had
no component gate, so on Container installations they silently
navigated to broken pages. Gate them on the hassio component and route
the missing-hassio case through the existing no_supervisor error
message, which now links directly to the installation docs.
Also remove the unreachable /hassio/_my_redirect/ fallback that was
left behind by the standalone hassio panel removal (#29132), and
update the no_supervisor string: Home Assistant Supervised is no
longer a supported installation method (see architecture discussion
home-assistant/architecture#1198), only Home Assistant OS.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The standalone hassio panel at /hassio was removed in #29132 and
replaced by the apps panel under /config/apps in #28245. A couple of
references to the old URL path were missed: a dead branch in the
quick-bar My-link builder and a /hassio/ startsWith check that kept
the configuration sidebar item highlighted.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Clean
* Scrollable option
* Refactor
* Remove wrap
* Restore
* Show grab cursor when dragging
* Overflow handling
* Remove extra space on start and end item
* Shrink title
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
* Increase min width of title, set var
* More specific
* Use 120px min on small layouts
* Try to fix sizing
* No unnessasary vars
* Format
---------
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
* 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>
The PR template includes a checklist item linking to the development
checklist page, but that page only covers core/Python-specific items
(pypi, requirements_all.txt, CODEOWNERS, .strict-typing, Ruff). None
of these apply to the frontend repository.
No frontend-specific development checklist exists, so remove the item
entirely rather than link to irrelevant documentation. The "perfect PR
recommendations" checklist item already covers general PR best practices.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add Automations, Scenes, Scripts, Developer Tools, Integrations,
Devices, and Entities to the "Other routes" section of the navigation
picker. Also resolve these paths with proper labels and icons in
computeNavigationPathInfo so they display correctly everywhere
(shortcut cards, edit overview, etc.).
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Add per-section theme support
* Fix linting errors: rename property parameter and use dot notation
* Fix TypeScript error: cast to any for __themes property
* Refactor theme application logic for race condition on first load, missing reconnect handling, and the fragile _applyTheme internals https://github.com/home-assistant/frontend/pull/29745
* correct formatting with prettier --write
* Fix theme application logic on reconnect by checking for theme configuration
* Pass section theme to background component for theme variable access
Section backgrounds now receive the section's theme and hass properties,
allowing them to apply the theme via applyThemesOnElement(). This enables
background components to access CSS variables from the section's theme,
particularly --ha-section-background-color when using the 'Default' color option.
Previously, the background component was rendered as a sibling to the section
element and couldn't access theme variables from the section's applied theme.
Now the theme is explicitly passed from hui-sections-view and applied to the
background component itself, making theme cascading work correctly.
* Reorder section settings: theme before background
* Add helper text support to theme selector
Theme selectors can now display helper text below the dropdown. Added helper property to ha-selector-theme and ha-theme-picker components, which is passed through to ha-select. Updated section theme label and added helper text to explain its purpose.
* Address PR review feedback: move theme to end and simplify label
- Move theme selector to end of form (after background section)
- Change label from 'Section theme' to 'Theme' as context is already clear
* Handle theme removal for background
---------
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
* Alllow setting of toast position
* Switch to use offset
* Create wrapper for toast to offset with automation editor
* Use wrapper
* Add for clipboard pastes
* Make automation toasts dismissable
* Apply for script editor
* Rename
* Resolve add-on name and icon for shortcut card /app/ navigation paths
When a shortcut card or badge navigates to /app/{slug}, fetch the add-on's
panel info (title and icon) from the supervisor ingress panels endpoint and
display it instead of the generic "app" panel fallback.
Adds a cached collection for ingress panel data (title and icon per add-on)
using getCollection, so the data is fetched once per connection.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Simplify
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
If the app config contains a schema field like this one:
```
privileges:
- "list(ALTER|CREATE|...|UPDATE)?"
```
it was rendered incorrectly as a drop-down where only one item can be
selected - but this is wrong because of the preceding `-` denoting it
should be a list containing the listed values. Supervisor translated
this to an entry of type `select` with `multiple: true`. The `multiple`
flag wasn't passed along, with the flag set the field renders as
expected.
Fixes#51533
* Add Music Assistant fallback domain icon
Add mdiMusic as the fallback icon for the music_assistant domain
in FALLBACK_DOMAIN_ICONS, so the integration has a proper icon
when dynamic icons are unavailable.
https://claude.ai/code/session_01GfNQCZL3dF1GXLRfhNRt25
* Revert "Add Music Assistant fallback domain icon"
This reverts commit 130d6eddee.
* Add Music Assistant logo as injectable mdi icon
Add the Music Assistant logo SVG as a special named icon, following
the same pattern as the Home Assistant logo (mdi:home-assistant).
This allows referencing mdi:music-assistant anywhere in the frontend
(e.g., add-on sidebar icon) and it resolves to the Music Assistant
logo SVG path.
https://claude.ai/code/session_01GfNQCZL3dF1GXLRfhNRt25
* Simplify logic to add more in future
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Fix history/sensor cards stuck loading after backend restart
- Add { resubscribe: false } to history subscriptions to prevent
corrupt HistoryStream state on auto-resubscription
- Add connection-status handlers to re-subscribe on reconnect
- Add sentinel pattern to prevent re-entrant async subscriptions
- Add shouldUpdate/updated retry when components become available
- Clear sensor device classes cache on WS error
- Clear _error on reconnect so cards can retry
- Add .catch() on unsubscribe to handle dead subscriptions
* Fix type annotation for callWS in getSensorNumericDeviceClasses
* Address review: type connection-status handlers, add reconnect to history panel
- Use HASSDomEvent<ConnectionStatus> instead of (ev as CustomEvent).detail
for proper type safety on all connection-status handlers
- Add connection-status handler to ha-panel-history so it re-subscribes
after backend restart (addresses concern about resubscribe: false)
* Address review: sentinel pattern, reconnect handling, stale data reset
- Add sentinel pattern to ha-more-info-history, ha-panel-history,
hui-history-graph-card to prevent re-entrant subscription races
- Refactor hui-trend-graph-card-feature from SubscribeMixin to manual
subscription management with connection-status reconnect support
- Reset stale history/statistics data on reconnect in
hui-history-graph-card and hui-map-card before re-subscribing
- Wrap fetchStatistics and getSensorNumericDeviceClasses calls in
ha-panel-history with try/catch to handle errors gracefully
- Chain .catch directly on subscribeHistoryStatesTimeWindow in
hui-trend-graph-card-feature to avoid detached-promise race condition
* Centralize history stream reconnect handling in data layer
Move the reconnect logic from every consumer into `subscribeHistoryStream`
in data/history.ts. The helper listens to the connection's `ready` event
itself, and on reconnect creates a fresh `HistoryStream` and rebuilds
params (so `start_time` for the time-window variant is re-anchored to
"now"). `resubscribe: false` stays as an internal implementation detail.
Removes the duplicated `_handleConnectionStatus` boilerplate and
`connection-status` window listeners from all six history consumers.
* Render subscription errors and make _error reactive
`_error` was declared as a plain string field in hui-graph-header-footer
and ha-more-info-history (non-reactive) and typed as Error/string while
being assigned the WS error object. hui-trend-graph-card-feature had it
reactive but never rendered it.
Align all three with the hui-history-graph-card pattern: reactive
`{ code, message }` and a user-visible error branch in render(). Without
this, a failed subscription would leave the component stuck on a spinner
forever.
---------
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Add stacked mode to statistics-chart
Allows displaying the entries as stacked lines or stacked bars. This means we can create charts similar to the energy graph cards but with alternate entities.
* Move fillDataGapsAndRoundCaps to components/chart
Now used in statistics-chart too, so move to common chart location.
Re-export in energy-chart-options.ts to minimise changes throughout energy cards.
* Correct order of line/bar in statistics graph card editor
Line and Bar options were unintentionally reversed in the displayed list.
* Support unstacked bar charts in fillDataGapsAndRoundCaps
* Add controls option to media player playback card feature
Allow users to configure which playback controls are shown and in what
order. When controls are explicitly configured, each selected control
is rendered as its own button in the specified order. When no controls
are configured, the original default behavior is preserved.
Also adds a configuration editor for the feature and fixes inline
feature padding in the tile card container.
* Revert padding changes to ha-tile-container
* Use computeMediaControls for default playback buttons
Reuse the shared computeMediaControls function for the default (no
explicit controls) path instead of duplicating the logic. Apply the
narrow filter to both paths via a shared _filterNarrow method.
* Update YAML and Jinja code editor support, support Jinja in YAML
* add autocomplete for ha jinja functions
* Use snippets and better autocomplete for jinja
* Add autocomplete for devices
* Add area, floor, label autocomplete
* Add yaml scalar type highlighter
* Add autocomplete for `states` var
* Add autocomplete for attributes
* Make autocomplete work on id and name
* Add missing functions that can also be used as filter
* Make dialog title a semantic heading element
* Move away from inheriting everything from modal title parent
* Update src/dialogs/generic/dialog-box.ts
---------
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
* Allow custom dashboard strategies to register for the add dashboard dialog
Adds a window.customDashboardStrategies registration mechanism (mirroring
window.customCards) so third-party strategies can appear in the new dashboard
picker. Only dashboard-level strategies are surfaced; view and section
strategies are excluded. Custom strategies appear in their own section and
are included in search results.
https://claude.ai/code/session_019MXBdWUQrFQfH54QVjbq8y
* Rename custom dashboards heading to community dashboards
https://claude.ai/code/session_019MXBdWUQrFQfH54QVjbq8y
* Consolidate into a single customStrategies registry for all strategy types
The window.customStrategies array now accepts entries with a strategyType
field (dashboard, view, or section). The dialog filters for dashboard
strategies. This allows future use of the same registry for view and
section strategy registration.
https://claude.ai/code/session_019MXBdWUQrFQfH54QVjbq8y
* Space tokens
* Space tokens
* Add support for images
* Allow single image from custom strategy
* Load needed resources for new dashboard dialog
* Preload custom strategies
* Catch potential error
* Reset if error
* Improve typing
* Cache module resources to avoid duplicate loads
* Revert "Cache module resources to avoid duplicate loads"
This reverts commit 87bbcc0451.
* Set a max height for dashboard images (match max height of current core images)
* Remove image support
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Hide _my_redirect and notfound panels from navigation picker
These internal panels are not useful navigation targets and should not
appear in the "Other routes" section of the navigation picker.
https://claude.ai/code/session_01DT6YNh9gjLpTztxA6z79w5
* Address review: use panel constants and move to module level
- Add MY_REDIRECT_PANEL constant to src/data/panel.ts
- Use NOT_FOUND_PANEL and MY_REDIRECT_PANEL instead of string literals
- Move HIDDEN_PANELS to module level since it doesn't need recreation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add SYSTEM_PANELS constant and use in navigation picker and quick bar
- Add APP_PANEL constant and SYSTEM_PANELS array to data/panel.ts
- Use SYSTEM_PANELS in ha-navigation-picker.ts and quick_bar.ts
- Remove obsolete hassio panel filter from quick bar (no longer exists)
- Also hides the app panel from navigation picker
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
The navigation picker's _getItems was adding an "Add custom path" item,
but ha-picker-combo-box already adds one when allowCustomValue is set
and there's a search string. Remove the duplicate from _getItems since
the combo box handles it via the customValueLabel prop.
https://claude.ai/code/session_01NAB8bo1B6HuGFwKZVbvL1S
Co-authored-by: Claude <noreply@anthropic.com>
* Reuse headings for config dashboard repairs and updates
* Keep headings internal to card and remove icons
* Merge headings into components
* Remove extra component for heading
* Use correct back links
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
---------
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
* Allow showing/hiding welcome message on home overview
Add a toggle in the edit overview dialog to show or hide the
"Welcome, [user]" greeting header on the home overview page,
following the same pattern as the existing summary enable/disable.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Move welcome message toggle into its own section in home editor
The welcome message is a greeting header, not a summary card, so it
now lives in a separate "Greeting" section above the "Summaries" section.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* rename hidden_welcome_message to hide_welcome_message
* Use ha-form boolean selector for welcome message toggle
Replace manual label/ha-switch markup with ha-form using a boolean
selector for better accessibility and consistency with the rest of
the codebase.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add helper text to welcome message toggle in home editor
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Remove greeting section header
* Extract welcome message schema into a module-level constant
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Container registries can't be added really, they are part of an image
name. So the menu entry is a bit misleading. This commit renames it to
"Registry credentials" to make it more clear that it's just about
credentials for registries, not about adding registries.
* Replace mwc-linear-progress with ha-progress-bar
* Update src/panels/lovelace/cards/hui-media-control-card.ts
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Remove duplicate import of ha-slider in hui-media-control-card.ts
---------
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Use websocket subscription for calendar events
Replace polling-based calendar event fetching with real-time websocket subscriptions. This leverages the new subscription API added in core to provide automatic updates when calendar events change, eliminating the need for periodic polling.
The subscription pattern follows the same approach used for todo items, with proper lifecycle management and cleanup.
Related: home-assistant/core#156340
Related: #27565🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix calendar events not loading on initial render
Remove premature subscription attempt in setConfig() that was failing because the date range wasn't available yet. The subscription now properly happens when the view-changed event fires from ha-full-calendar after initial render, which includes the necessary start/end dates.
This ensures calendar events load immediately when the component is first displayed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix calendar subscription data format mismatch
The websocket subscription returns event data with fields named start and end, but the frontend was expecting dtstart and dtend. This caused events to not display because the data wasn't being properly mapped.
Now properly transform the subscription response format:
- Subscription format: start/end/summary/description
- Internal format: dtstart/dtend/summary/description
This ensures both initial event loading and real-time updates work correctly.
* Address PR review comments
Fixes based on Copilot review feedback:
1. **Fixed race conditions**: Made _unsubscribeAll() async and await it
before creating new subscriptions to prevent old subscription events
from updating UI after new subscriptions are created.
2. **Added error handling**: All unsubscribe operations now catch errors
to handle cases where subscriptions may have already been closed.
3. **Fixed type safety**: Replaced 'any' type with proper
CalendarEventSubscriptionData type and added interface definition
for subscription response data structure.
4. **Improved error tracking**: Calendar card now accumulates errors from
multiple calendars instead of only showing the last error.
5. **Prevented duplicate subscriptions**: Added checks to unsubscribe
existing subscriptions before creating new ones in both
_subscribeCalendarEvents and _requestSelected.
6. **Fixed null handling**: Properly convert null values to undefined
for CalendarEventData fields to match expected types.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Extract event normalization to shared utility function
Reduced code duplication by extracting the calendar event normalization
logic from both hui-calendar-card.ts and ha-panel-calendar.ts into a
shared utility function in calendar.ts.
The normalizeSubscriptionEventData() function handles the conversion
from subscription format (start/end) to internal format (dtstart/dtend)
in a single, reusable location.
This improves maintainability by ensuring consistent event normalization
across all calendar components and reduces the risk of divergence.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Address additional review comments
Fixed remaining issues from code review:
1. **Added @state decorator to _errorCalendars**: Ensures proper reactivity
in calendar card when errors occur or are cleared, triggering UI updates.
2. **Fixed error accumulation in panel calendar**: Panel now properly
accumulates errors from multiple calendars similar to the card
implementation, preventing previously failed calendars from being
hidden when new errors occur.
3. **Removed duplicate subscription check**: Deleted redundant duplicate
subscription prevention in _requestSelected() since
_subscribeCalendarEvents() already handles this at lines 221-227.
Note: The [nitpick] comment about loading states during await is a
performance enhancement suggestion, not a required fix.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update src/panels/lovelace/cards/hui-calendar-card.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/panels/lovelace/cards/hui-calendar-card.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/panels/calendar/ha-panel-calendar.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor fetchCalendarEvents to use shared normalization utility
Eliminated code duplication by reusing normalizeSubscriptionEventData() in
fetchCalendarEvents(). After extracting date strings from the REST API
response format, we now convert to a subscription-like format and pass
it to the shared utility.
This ensures consistent event normalization across both REST API and
WebSocket subscription code paths, reducing maintenance burden and
potential for divergence.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Move date normalization into normalizeSubscriptionEventData
The getCalendarDate helper is part of the normalization process and should be inside the normalization function. This makes normalizeSubscriptionEventData handle both REST API format (with dateTime/date objects) and subscription format (plain strings).
Changes:
- Moved getCalendarDate into normalizeSubscriptionEventData
- Updated CalendarEventSubscriptionData to accept string | any for start/end
- Made normalizeSubscriptionEventData return CalendarEvent | null for invalid dates
- Simplified fetchCalendarEvents to use the shared normalization
- Added null filtering in calendar card and panel event handlers
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Replace any types with proper TypeScript types
Added proper types for calendar event data:
- CalendarDateValue: Union type for date values (string | {dateTime} | {date})
- CalendarEventRestData: Interface for REST API event responses
- Updated fetchCalendarEvents to use CalendarEventRestData[]
- Updated CalendarEventSubscriptionData to use CalendarDateValue
- Updated getCalendarDate to use proper type guards with 'in' operator
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Unify CalendarEventRestData and CalendarEventSubscriptionData
Both interfaces had identical structures, so unified them into a single
CalendarEventSubscriptionData interface that is used for both REST API
responses and WebSocket subscription data.
Changes:
- Removed CalendarEventRestData interface
- Updated fetchCalendarEvents to use CalendarEventSubscriptionData
- Added documentation clarifying the interface is used for both APIs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* PR comments
* fix import
* fix import
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update eslint to v10.1.0
Migrate from eslint-plugin-import to eslint-plugin-import-x since the
original plugin uses removed ESLint 10 APIs (context.parserOptions,
context.parserPath). Airbnb-base non-import rules preserved via
FlatCompat with import rules stripped and replaced by import-x.
- eslint 9.39.4 → 10.1.0
- Add eslint-plugin-import-x 4.16.2
- Add @eslint/eslintrc and @eslint/js as explicit deps
- Remove --flag v10_config_lookup_from_file (now default)
- Replace /* eslint-env */ comment with config-based globals
- Update all import/ rule references to import-x/
* Remove unnecessary eslint-disable for generated gallery imports
The import-pages file is generated as .ts, so import-x/extensions
doesn't require an extension (ts: "never" in config).
* Cleaned up experience when no pin support is possible to provide better messaging.
* Improvements to messaging depending on lock features
* Added documentation links
* Added prettier format
* Add a summary for battery status and a battery strategy
* some cleanup around location given its a sub view and naming
* Use the device name rather than entity name
* Refactor into a maintenance panel
* Adjust naming
* rename
* Add maintenance dashboard to built in dashboard list
* use grey for maintenance colour
* Fix typos in maintenance panel
- _searchParms -> _searchParams
- Add Event type to _back parameter
- Fix duplicate closing tag
* Move maintenance strategy to src/panels/maintenance/strategies/
- Move maintenance-view-strategy.ts to maintenance panel directory
- Update import paths in get-strategy.ts, home-summaries.ts, and hui-home-summary-card.ts
- Fix ha-floor-icon import path in maintenance-view-strategy.ts
---------
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Add Last 365 Days option to energy date selection
There seem to be two use cases for the "Last 12 Months" option - those that expect it to produce whole months (original behaviour up to 2026.1, then again from 2026.4), and those that want an option for the last 365 days,
Given this descrepancy in expected behaviour, add an explicit "Last 365 days" option.
* Use subDays for last 365.
* Add loading state to energy dashboard
* Add fade-in/-out
* Update src/panels/lovelace/components/hui-energy-period-selector.ts
Co-authored-by: Tom Carpenter <T.Carpenter@leeds.ac.uk>
* Feedback
* Feedback
* Apply suggestion from @MindFreeze
---------
Co-authored-by: Tom Carpenter <T.Carpenter@leeds.ac.uk>
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Fix typos and syntax errors in ha-panel-climate.ts
- Rename _searchParms to _searchParams (typo fix)
- Fix duplicate closing hui-view-container tag
- Clean up formatting
* Fix duplicate hui-view-container closing tag in light and security panels
* Allow customizing home page summaries and adding quick links
Add ability to hide built-in summaries (light, climate, security,
media players, weather, energy) and add custom quick links to
dashboards, sidebar items, or other pages from the edit overview dialog.
https://claude.ai/code/session_01AqgbQULH5vfETibiba5RXH
* Remove quick links, focus on summary enable/disable only
https://claude.ai/code/session_01AqgbQULH5vfETibiba5RXH
* Match summary editor rows to dashboard order with icon, color, and toggle on right
Each summary row now shows its colored icon and title matching the
dashboard appearance, with the toggle switch moved to the right side.
Order matches the dashboard: light, climate, security, media players,
weather, energy, persons.
https://claude.ai/code/session_01AqgbQULH5vfETibiba5RXH
* Lint
* Apply suggestion from @balloob
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Create shared select card feature base class
* Add sound mode and source features
* Remove serviceValueKey as its the same as attribute
* Migrate more
* Migrate select options
* Add fan direction
* Remove default usages
* Add support for skeleton on tile info secondary text
* Show loading state for users of tile info
* Update src/components/tile/ha-tile-info.ts
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
---------
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Add persons summary tile to home overview dashboard
Show how many people are currently home in the Summary section
of the default home dashboard. Only persons with at least one
tracking device are included. The tile only appears when the map
panel is loaded and at least one tracked person entity exists.
Tapping navigates to the map panel. Displays a count of persons
home or "Nobody" when all are away.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove persons tile from home overview strategy
* Translation tweak
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Add solo-select gesture to chart legend
Ctrl+click (Cmd+click on Mac) or long-press (touch, 500ms) a legend
item to solo-select it:
- Solo-click any item → hide everything else, show only that item
- Solo-click the only visible item → restore all
There is no special "solo mode" — the gesture simply sets which items
are hidden. Normal click/tap continues to toggle individual series,
including after a solo action (e.g. solo a, then click b to add it).
Closes https://github.com/orgs/home-assistant/discussions/1492
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Deduplicate legend parsing in _renderLegend and _getAllLegendIds
Both methods parsed options.legend and filtered datasets identically.
Extract the shared logic into a new _getLegendItems method.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Update src/components/chart/ha-chart-base.ts
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
* Add ability to duplicate a section
* Move section edit mode buttons to overflow menu
* Fix typing for concat and push parameters
* Fix incorrect clipboard typing for badges
* Fix base time inputs reportValidity() function
The queryAll selector returns a NodeList not not an array. Need to spread it to an array before we can use every().
* Validate the date range picker time inputs
Enable auto validation to get the nice red underline on invalid values, and then check validity before accepting the input.
* Fix automatic 24hr value conversion in AM/PM format
When using AM/PM, entering a 24 hour value will automatically convert the first time. For example 15 will become 3. However if you then enter 15 again it will stay as 15 and not update.
To fix this, make sure we trigger an update of the input field once the current update cycle is complete.
* Validate time inputs on save not value update
In the value changed callback, the update 24->12hr input correction will not have been updated and therefore they will report invalid.
Refactor climate HVAC mode handling in state-history-chart-line to be data-driven
Replace repetitive per-mode detection, dataset creation, and series population
blocks with a single CLIMATE_MODE_CONFIGS array and loops over active modes.
* Support additional climate hvac_mode in state-history-chart-line
* Reverted changes to the chart legend to keep change focussed on the additonal hvac_mode support
* Remove the tests since they don't add value.
Add `white-space: pre-line` to the event description style so that
newlines in the calendar event description are rendered correctly
instead of being collapsed into a single line.
2026-03-26 07:01:02 +01:00
1059 changed files with 29255 additions and 14021 deletions
A toggle switch can represent two states: on and off.
A toggle switch representing two states: on and off.
## Examples
## Implementation
Switch in on state
### Example usage
<div class="wrapper">
<ha-switch checked></ha-switch>
<ha-switch></ha-switch>
<ha-switch disabled></ha-switch>
<ha-switch disabled checked></ha-switch>
</div>
```html
<ha-switchchecked></ha-switch>
Switch in off state
<ha-switch></ha-switch>
Disabled switch
<ha-switchdisabled></ha-switch>
## CSS variables
<ha-switchdisabledchecked></ha-switch>
```
For the switch / toggle there are always two variables, one for the on / checked state and one for the off / unchecked state.
### API
The track element (background rounded rectangle that the round circular handle travels on) is set to being half transparent, so the final color will also be impacted by the color behind the track.
This component is based on the webawesome switch component.
Check the [webawesome documentation](https://webawesome.com/docs/components/switch/) for more details.
`switch-checked-color` / `switch-unchecked-color`
Set both the color of the round handle and the track behind it. If you want to control them separately, use the variables below instead.
| readonly | Boolean | false | Makes the textarea readonly. |
| disabled | Boolean | false | Disables the textarea and prevents user interaction. |
| required | Boolean | false | Makes the textarea a required field. |
| auto-validate | Boolean | false | Validates the textarea on blur instead of on form submit. |
| invalid | Boolean | false | Marks the textarea as invalid. |
| validation-message | String | "" | Custom validation message shown when the textarea is invalid. |
| minlength | Number | - | The minimum length of input that will be considered valid. |
| maxlength | Number | - | The maximum length of input that will be considered valid. |
| name | String | - | The name of the textarea, submitted as a name/value pair with form data. |
| autocapitalize | "off"/"none"/"on"/"sentences"/"words"/"characters" | "" | Controls whether and how text input is automatically capitalized. |
| autocomplete | String | - | Indicates whether the browser's autocomplete feature should be used. |
| autofocus | Boolean | false | Automatically focuses the textarea when the page loads. |
| spellcheck | Boolean | true | Enables or disables the browser's spellcheck feature. |
| inputmode | "none"/"text"/"decimal"/"numeric"/"tel"/"search"/"email"/"url" | "" | Hints at the type of data for showing an appropriate virtual keyboard. |
| enterkeyhint | "enter"/"done"/"go"/"next"/"previous"/"search"/"send" | "" | Customizes the label or icon of the Enter key on virtual keyboards. |
#### CSS Parts
-`wa-base` - The underlying wa-textarea base wrapper.
-`wa-hint` - The underlying wa-textarea hint container.
-`wa-textarea` - The underlying wa-textarea textarea element.
**CSS Custom Properties**
-`--ha-textarea-padding-bottom` - Padding below the textarea host.
-`--ha-textarea-max-height` - Maximum height of the textarea when using `resize="auto"`. Defaults to `200px`.
-`--ha-textarea-required-marker` - The marker shown after the label for required fields. Defaults to `"*"`.
@@ -19,7 +19,7 @@ The Home Assistant interface is based on Material Design. It's a design system c
We want to make it as easy for designers to contribute as it is for developers. There’s a lot a designer can contribute to:
- Meet us at <a href="https://www.home-assistant.io/join-chat-design" rel="noopener noreferrer" target="_blank">Discord #designers channel</a>. If you can't see the channel, make sure you set the correct role in Channels & Roles.
- Find the latest UX <a href="https://github.com/home-assistant/frontend/discussions?discussions_q=label%3Aux" rel="noopener noreferrer" target="_blank">discussions</a> and <a href="https://github.com/home-assistant/frontend/labels/ux" rel="noopener noreferrer" target="_blank">issues</a> on GitHub. Everyone can start a new issue or discussion!
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.