Compare commits

..
27 Commits
Author SHA1 Message Date
WendelinandClaude Opus 5.5 01f9c5eb5b Add a button to enlarge the card and badge editors (#56186)
Replace the hidden title click with a visible button next to Help,
shown on desktop only. The width animates after a click and is not
animated when the code editor switches to full screen.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-26 20:31:41 +02:00
renovate[bot] 40a28525fb Update dependency typescript-eslint to v8.74.0 (#56187)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-26 20:25:40 +02:00
f80deb0240 Timer progress bar tile card feature (#55994)
* Timer progress bar tile card feature

* Fix Copilot issues

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

* Calculate remaining time only once

* Fix issues

* Switch willUpdate to update

* Update src/panels/lovelace/card-features/hui-timer-progress-card-feature.ts

Co-authored-by: Petar Petrov <[email protected]>

* Fix reduced motion

---------

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Petar Petrov <[email protected]>
2026-11-26 19:59:29 +02:00
WendelinandClaude Opus 5.5 68313876d3 Only offer the tab's categories in the Marketplace filter (#56183)
The integration category filter offered every category on every tab, so
on the installed tab a category nothing installed is in emptied the
table. It now lists the categories of the tab's repositories, and a
category picked on another tab that this one doesn't list is left out
here but kept for that tab, like statuses.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-26 16:54:07 +01:00
Paul Bottein c3db90ae22 Swipe to open or close the tilt of tilt-only covers (#56182) 2026-11-26 16:52:38 +01:00
WendelinandClaude Opus 5.5 95e0988b93 Load Marketplace category icons only when they are shown (#56185)
The repository page loaded the integration category icons for every
repository, also for ones without integration categories. Load them once
a shown repository has categories, and only once per page.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-26 16:08:31 +01:00
WendelinandClaude Opus 5.5 00312420d8 Remove clicking the title to enlarge the more info dialog (#56176)
Clicking the title of the more info dialog made it fill the screen, but
nothing showed that this was possible. For a camera it only added black
bars, since its info view already fits the picture. Cameras also no
longer open at the large width: their info view and the image's size the
dialog from the picture, and their other views are as wide as those of
any other entity. A large width passed by the caller still works.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-26 15:24:20 +01:00
WendelinandClaude Opus 5.5 f2116b61fc Remove two marketplace tests that only cover helpers (#56184)
Follow-up to #55130 review: the empty integration_category link test only
covered the query param decoder, and the filtersOfTab category test only
covered a spread.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-26 14:19:49 +00:00
Bram KragtenandClaude Opus 5.5 2e872965f6 Draw the slats of tilt-only covers from their state (#56173)
* Draw the slats of tilt-only covers from their state

A tilt-only cover that only reports open or closed, without a tilt
position, was always drawn with half open slats. When the cover can't
move up or down, its state describes the slats, so draw them at the
closed tilt position when closed and at the open tilt position when
open. Covers that also move up and down keep the neutral slats, as
their state describes the position.

Add tilt-only blinds, open and closed, to the cover more-info gallery.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Draw the slats from the state with the default tilt positions

Core only sends the open and closed tilt positions of covers that can
set their tilt position, so a tilt-only cover drawn from its state
always uses 0 and 100.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-26 15:19:19 +01:00
Paul Bottein cbf745f38a Fix rows value bubble cut off in the card size editor (#56181) 2026-11-26 15:02:14 +01:00
WendelinandClaude Opus 5.5 fe7cedd04b Make the image more info as wide as its picture fits (#56141)
* Make the image more info as wide as its picture fits

The more info of an image was always 1024px wide. Like the camera, the
dialog now takes the width the picture needs to be as high as there is
room for, between 580px and 1920px, but never wider than the picture
itself, so small images keep the standard width. Images no longer open
at the large width before their picture is loaded. The camera's aspect
ratio event becomes media-size-changed, with an optional natural width,
and the dialog forgets the size whenever the entity changes, also when
going to a related entity or back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Keep the image size for cached views and leave room for the safe area

A picture that finished loading while the info view was detached by
cache() couldn't send its size, and it doesn't load again when the view
is shown, so more-info-image sends the size again when it's reattached.
The picture's height now also leaves out the safe area, like the
dialog's height limit, and the image info's bottom padding that grows
with it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-26 13:39:58 +02:00
Paul Bottein 2e9d8a1788 Fix integration names and toast overlap in startup details (#56147)
* Fix integration names and toast overlap in startup details

* Track startup details opened from the completion toast
2026-11-26 12:24:41 +01:00
Martin Salinas 332d612956 Give the tile icon's action its whole 48px area again (#56150)
* Give the tile icon's action its whole 48px area again

The tile container pads the icon by 6px so it is a 48px target, but the action handler was bound to the 36px circle inside it. A tap on that ring, around the circle or on a badge landed on the icon's host, which had no handler, and the container stopped it before the card's handler. Bind the action handler to the host instead.

* Let taps on the tile icon's badge reach the icon

With the action handler on the host, a tap on a badge in the default slot had the badge as its target, so a double tap across the badge and the rest of the icon fired two taps.

* Show the pointer cursor over the tile icon's whole area
2026-11-26 12:16:58 +01:00
WendelinandClaude Opus 5.5 11ef852384 Fix the Bluetooth adapter count on the dashboard (#56165)
* Fix the Bluetooth adapter count on the dashboard

The dashboard counted every bluetooth config entry that isn't disabled,
including ignored discoveries and entries without an adapter device, so
it could show more adapters than the adapters page lists. Move the
adapters page logic to a shared getBluetoothAdapters() helper and count
its enabled adapters on the dashboard. The count waits for the device
registry to load.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Show skeletons while the Bluetooth adapters load

Don't report zero adapters and an offline network before the config
entries and the device registry have loaded. Add tests for the shared
adapter selection.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Show an error with retry when the Bluetooth config entries fail to load

Otherwise the dashboard would keep showing its loading skeletons.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Keep the Bluetooth adapters link named while it loads

A skeleton in the link made its accessible name only "Loading". Show
"Bluetooth adapters" until the count is known instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-26 11:23:45 +01:00
394d5999b8 Show Home Assistant Link label on WebRTC in camera stream info (#56153)
* Show Home Assistant Link label on WebRTC in camera stream info

The camera stream info dialog labels the WebRTC row with
"Enhanced by Home Assistant Link" when the cloud TURN servers are in
use. The dialog reads cloud/status and uses the same check as core:
logged in, active subscription, and cloud_ice_servers_enabled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Wrap the Home Assistant Link tag on narrow screens

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Paulus Schoutsen <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-26 11:22:32 +01:00
Petar Petrov 384fdfdbc9 Group intl-messageformat with formatjs packages in Renovate (#56161)
Group intl-messageformat with the formatjs packages in Renovate
2026-11-26 10:14:17 +00:00
Martin Salinas 0cccdc5972 Don't set the max value when a circular slider is removed during a drag (#56163)
Cancel a circular slider drag when the slider is removed from the page
2026-11-26 11:49:09 +02:00
Aidan Timson 771eaa70ff Add a skill for browser checks and pull request screenshots (#56142)
* Add a skill for browser checks and pull request screenshots

* Point the screenshot reminder to the browser checks skill

* Cover light and dark, long text and recorded demos in the browser checks skill

* Check RTL with an RTL profile language in the browser checks skill

* Keep a before capture for every change to an existing screen

* Have agents add pull request screenshots themselves when they can
2026-11-26 11:02:29 +02:00
darkrain-nl aff47efe5e 2026.12 beta - Fix add integration search focus (#56151)
* Focus autofocus elements slotted into an adaptive dialog

* Test focusing autofocus elements slotted into a dialog
2026-11-26 09:50:16 +01:00
Erwin Douna f13470719c Restore dismissed energy meter suggestions (#56156)
* Restore dismissed energy meter suggestions

* Use a toolbar menu for dismissed meter suggestions and fix save races
2026-11-26 08:50:27 +02:00
Martin Salinas 5f769d613c Show the entity's value in number controls after the device puts it back (#56148)
* Show the entity's value in number controls after the device puts it back

The numeric input card feature and the number entity row bound the state straight to the control's value. When the entity came back to the value it had, Lit skipped the unchanged binding and the control kept the requested value. Bind with live() so the control is compared with the entity's value on each render.

* Remove the number row tests

They only check that the template puts the entity's value back on the controls, which is a rendering test. The gallery reproduction in the PR covers the change.
2026-11-26 08:44:12 +02:00
renovate[bot] f214ef8667 Update dependency @versatiles/style to v9.1.1 (#56158)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-26 08:32:28 +02:00
renovate[bot] 528ebe6b27 Update dependency memoize-one to v7 (#56160)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-26 08:32:20 +02:00
Gerd Naschenweng 82e6f1106f Cap the bar width in the statistics graph (#56097) 2026-11-26 08:04:48 +02:00
Martin Salinas f02656da54 Keep the color wheel drawn when only the cold white value is set (#56149)
With cw set and ww undefined, the ww !== null check let undefined through to rgbww2rgb, which returned NaN and made addColorStop throw, leaving the wheel blank. Moving the cold white slider of an RGBWW light that is off or in another color mode did that.
2026-11-26 07:52:12 +02:00
Matthias de BaatandClaude Opus 5.5 25307e427d Show when backup retention is paused for a location (#56088)
Automatic backup retention no longer deletes backups from locations
that are turned off for automatic backups (home-assistant/core#192788).
Show "Retention paused" in the locations list and an info alert on the
location page for those locations.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-25 22:17:03 +01:00
Paul Bottein 207cbcc585 Show the connection error when logged out and the server is offline (#56139)
* Show the connection error when logged out and the server is offline

* Show the connection error when the server responds with a 5xx

* Time out the server check before the login redirect

* Give the server check 10 seconds
2026-11-25 19:44:23 +02:00
26 changed files with 520 additions and 195 deletions

No files matched your search

@@ -0,0 +1,43 @@
---
name: ha-frontend-browser-checks
description: Check a Home Assistant frontend change in a browser and show it in a pull request. Use when checking how a change looks or behaves at different screen sizes, in light and dark mode, right to left (RTL) or with long translations, or when taking before and after screenshots or recording a demo of a feature for a pull request.
---
# HA Frontend Browser Checks
Use this skill to check a visible change in a browser and to show it in a pull request. Any browser tool you already have works if it can open a page, set its size, run a script in it, take screenshots and record video. Load `ha-frontend-testing` for the dev servers, and `ha-frontend-loading` for loading states.
Screenshots and recordings help reviewers see what changed, but they don't make a large change easy to review. [Keep pull requests small](https://contributors.home-assistant.io/start/pull-requests/#keep-it-small), and make sure you have reviewed and understood the change and can explain it, as the [AI policy](https://contributors.home-assistant.io/start/ai-policy/) asks.
## Check Real Devices
Check the sizes the change affects rather than one fixed size, such as a phone, a tablet in both orientations, a laptop and a large desktop monitor. Include a small phone. Take each device's viewport in CSS pixels, its pixel ratio and touch support from the device presets your tools have, rather than from memory, and check the page really has that size once it's set.
## Check Light And Dark
When the change can look different in light and dark mode, such as a colour, border, background or image, check it in both. Switch the colour scheme in your browser tool, with the profile's theme following it, or pick light and dark in the profile. A fix for one mode only needs that mode.
## Check Right To Left (RTL)
Check layout, alignment, icons and anything with a direction in RTL. In the app, set your profile language to one written right to left, then set it back: many components take their direction from the language, so setting the page to RTL in your browser tool leaves them left to right. The gallery's RTL toggle checks styling only.
## Check Long Text
When a change adds or changes text, check it in a language with long words or long translations too, so labels, descriptions and buttons don't overflow or wrap badly. When the new string isn't translated yet, try a rough translation to check its length.
## Show It In The Pull Request
- When the change alters something that exists already, capture the same screen on `dev` and on your branch, in the same state, and put them side by side. Only a new screen, with nothing before it, needs just the after.
- Keep the size of every capture fixed, screenshots as well as videos. Set the page size before you capture and don't change it in between, and capture the same area each time, so the subject sits in the same place in before and after. For a card or other part of the page, work out a fixed area around it for each size you test, and use that same area on both branches.
- Say which device, size or mode each capture shows.
- Make the change easy to see: capture the part of the screen it affects rather than a whole page where it's a few pixels.
- Save captures outside the repository, so they can't be committed by accident.
- Keep personal details out: use demo data, such as the demo or the Demo integration, and mask anything else before you capture, such as names, addresses, IP and MAC addresses, hostnames, serial numbers and tokens. Check each capture before you attach it.
Record a video when it shows the change better than a still, such as an animation, a drag, a loading sequence (hold the loading state as "Checking It" in `ha-frontend-loading` shows) or a flow across several screens. Keep each video short and small: GitHub limits upload sizes, and reviewers have to watch it. You can record it yourself with the tools you have; it doesn't need a person.
- Use the recording tools at hand: your browser tool's recorder for a page, or a desktop screen recorder for a window, such as a phone emulator, so the device frame shows.
- Don't resize, zoom or take screenshots while recording, which redraw the page at another size and make the video jump.
- Check the whole recording before you attach it. For a short clip, look at a frame every second or half second, not only the first and last, since the page can jump to another size partway through. Record again if it does. Take stills from the same frames, so they match the video.
- Keep the window drawn on a screen. A hidden or minimised window records only a frame every few seconds.
- Label each video, such as **Before** and **After**, and say what it shows and how you set it up. Say what you didn't record and why.
+1 -1
View File
@@ -20,7 +20,7 @@ When creating a pull request, use `.github/PULL_REQUEST_TEMPLATE.md` as the body
- Do not omit, reorder, or rewrite template sections.
- Check the appropriate "Type of change" box based on the actual change.
- Do not check checklist items on behalf of the user.
- If the PR includes UI changes, remind the user to add screenshots or a short video.
- If the PR includes UI changes, add screenshots or a short video, taken as `ha-frontend-browser-checks` describes. Only ask the user to add them when you can't take them yourself.
- Explain what the change does for users, not only implementation details.
- Use Markdown.
+2 -1
View File
@@ -53,10 +53,11 @@ Detailed guidance lives in `.agents/skills/<name>/SKILL.md`. Load every matching
- `ha-frontend-ux-readiness`: UI/UX routing that complements frontend review for new user experiences.
- `ha-frontend-gallery`: gallery pages, demos, sidebar structure, content, and verification.
- `ha-frontend-demo`: standalone demo structure, configurations, navigation, shared stubs, and verification.
- `ha-frontend-browser-checks`: checking a change in a browser at real device sizes, in light and dark mode, right to left (RTL) and with long translations, and screenshots and recorded demos for pull requests.
## Pull Requests
When creating a pull request, use `.github/PULL_REQUEST_TEMPLATE.md` as the PR body. Preserve template sections, check only the appropriate type-of-change boxes, and do not check checklist items on behalf of the user. If the PR includes UI changes, remind the user to add screenshots or a short video.
When creating a pull request, use `.github/PULL_REQUEST_TEMPLATE.md` as the PR body. Preserve template sections, check only the appropriate type-of-change boxes, and do not check checklist items on behalf of the user. If the PR includes UI changes, add screenshots or a short video, taken as `ha-frontend-browser-checks` describes. Only ask the user to add them when you can't take them yourself.
## AI policy
+3 -3
View File
@@ -79,7 +79,7 @@
"@swc/helpers": "0.5.24",
"@tsparticles/engine": "4.5.4",
"@tsparticles/preset-links": "4.5.4",
"@versatiles/style": "9.1.0",
"@versatiles/style": "9.1.1",
"@vibrant/color": "4.0.4",
"@vvo/tzdb": "6.204.0",
"@webcomponents/scoped-custom-element-registry": "0.0.11",
@@ -110,7 +110,7 @@
"lit-html": "3.3.3",
"maplibre-gl": "6.19.0",
"marked": "18.2.1",
"memoize-one": "6.0.0",
"memoize-one": "7.0.0",
"nanoid": "6.0.2",
"node-vibrant": "4.0.4",
"object-hash": "3.0.0",
@@ -214,7 +214,7 @@
"terser-webpack-plugin": "5.6.1",
"ts-lit-plugin": "2.0.2",
"typescript": "6.0.3",
"typescript-eslint": "8.73.0",
"typescript-eslint": "8.74.0",
"vite": "8.3.8",
"vite-tsconfig-paths": "6.1.1",
"vitest": "5.1.1",
+86 -86
View File
@@ -316,8 +316,8 @@ importers:
specifier: 4.5.4
version: 4.5.4
'@versatiles/style':
specifier: 9.1.0
version: 9.1.0([email protected])
specifier: 9.1.1
version: 9.1.1([email protected])
'@vibrant/color':
specifier: 4.0.4
version: 4.0.4
@@ -409,8 +409,8 @@ importers:
specifier: 18.2.1
version: 18.2.1
memoize-one:
specifier: 6.0.0
version: 6.0.0
specifier: 7.0.0
version: 7.0.0
nanoid:
specifier: 6.0.2
version: 6.0.2
@@ -615,7 +615,7 @@ importers:
version: 0.13.11([email protected])
eslint-plugin-import-x:
specifier: 4.18.1
version: 4.18.1(@typescript-eslint/[email protected]3.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected])
version: 4.18.1(@typescript-eslint/[email protected]4.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected])
eslint-plugin-lit:
specifier: 2.3.1
version: 2.3.1([email protected]([email protected]))
@@ -624,7 +624,7 @@ importers:
version: 5.1.3([email protected]([email protected]))
eslint-plugin-unused-imports:
specifier: 4.4.1
version: 4.4.1(@typescript-eslint/[email protected]3.0(@typescript-eslint/[email protected]3.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))
version: 4.4.1(@typescript-eslint/[email protected]4.0(@typescript-eslint/[email protected]4.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))
eslint-plugin-wc:
specifier: 3.1.0
version: 3.1.0([email protected]([email protected]))
@@ -716,8 +716,8 @@ importers:
specifier: 6.0.3
version: 6.0.3
typescript-eslint:
specifier: 8.73.0
version: 8.73.0([email protected]([email protected]))([email protected])([email protected])([email protected])
specifier: 8.74.0
version: 8.74.0([email protected]([email protected]))([email protected])([email protected])([email protected])
vite:
specifier: 8.3.8
version: 8.3.8(@types/[email protected])([email protected])([email protected])
@@ -2353,8 +2353,8 @@ packages:
leaflet: ^1.9.3
maplibre-gl: ^2.4.0 || ^3.3.1 || ^4.3.2 || ^5.0.0 || ^6.0.0
'@maplibre/maplibre-gl-style-spec@26.8.0':
resolution: {integrity: sha512-EClj+0m624zGw5gdCOsI5f88bYzkXfgoP2Sj5VGs2AYg9hZaPxvCumX5KDDs6aKFwl2ut+3jAeLhvrSz7hEsBQ==}
'@maplibre/maplibre-gl-style-spec@26.9.0':
resolution: {integrity: sha512-cQZK2lG3d6I5FjriPZCgJx/LiVMpWqoVibF+cgp2mkQ/P4BIGOsrA3WsvLw1wB28Q9JU9v2fapsQUJUbjjwa6g==}
hasBin: true
'@maplibre/[email protected]':
@@ -3535,50 +3535,50 @@ packages:
'@types/[email protected]':
resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==}
'@typescript-eslint/[email protected]3.0':
resolution: {integrity: sha512-UkygMFer53Yzn29MCYFTHf34hGXf5KJhiDWfIm1tXtXRrym1CS6l5H9Y3yCtPWChpC0/f93H88gdj8tN0dd4kw==}
'@typescript-eslint/[email protected]4.0':
resolution: {integrity: sha512-z3KXk1+Vm+d82ZRplOoC89ho4Rf1da5ju6sx8//92GnN532U62DGPjECXkkVqtYzIv0zoJlpO39SX2Z9tk6LVw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
'@typescript-eslint/parser': ^8.73.0
'@typescript-eslint/parser': ^8.74.0
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/[email protected]3.0':
resolution: {integrity: sha512-AuL45bVcmssHfZ3Di3cs9Q0l4gBm4ZFVrJOQEE7VpqW+PVgQaEwSwazz4TVIiFabXkk6U51EprYDwqw+HR8ePw==}
'@typescript-eslint/[email protected]4.0':
resolution: {integrity: sha512-ecr8AYdig7avVkxaHdQvxHnIJ/mOyliO4Gv/uWF8q69vBew/z3sexqBwHUZX5Vql+Ns0w4sH6gBLkICGbOvJkA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/[email protected]3.0':
resolution: {integrity: sha512-/pEf8Rc4Mjk+qJnY0uO1+Gadeal8uv50xpuic+srG2vIVatA0XxvWMUeMtFvs6OCHqftiQ7/+qH4aehG5stzIA==}
'@typescript-eslint/[email protected]4.0':
resolution: {integrity: sha512-z/mymuE+JlEeSFIv3Mo70EvgG1Zz74Hl0IDfExfXutARAP834bt+MppTD7mVAwmZO0GdxdOAi0jbTam749eH6g==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/[email protected]3.0':
resolution: {integrity: sha512-/TjD738Iq2rzj5z0ixVOi+TsvgjAzZPLPaH1yWdDBytR/HTR5gMpyYWZeCe5WTQZLwk3ho8AV7U3muoQCRtXBQ==}
'@typescript-eslint/[email protected]4.0':
resolution: {integrity: sha512-kpOdpu4CpWN5U38ox3f727DwWRBtUAVhyUJtqTBYe5gf2wYoxac7PgKP14txrxN7ICVtcjlLdzjqfRgpSnDKvQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/[email protected]3.0':
resolution: {integrity: sha512-lmtCFOfYaJfpqZywGuXi4FpNtE+NQ+YLe3T0K9rtEDcW8ZuGWvfI++pj8r05sYMI8vWT2CYK4rWyedmD6Rp4og==}
'@typescript-eslint/[email protected]4.0':
resolution: {integrity: sha512-p07wAuaS6BjCYgOSXKJi4YhvTnAf7fiG37e9THcpnYaQEt2QiTTYZWKwUFNgeRiywiMudazhzgddAirZ0GgHtQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/[email protected]3.0':
resolution: {integrity: sha512-MOC9i4xy1F7KcDde7Ip8jf1SrRiALb2Km4UWxGNjUE2YlhjIEo1ayE27GHIwIQyfWuHTmEonQT14uyurlyC6aA==}
'@typescript-eslint/[email protected]4.0':
resolution: {integrity: sha512-CV3Y3la8l3F9ANfxcfpgSSiQgJTe4IeLEoZV4O/gcW86Ugp8X6SKiQ0vm+QegXaRIbbDMokZZSF3A1CgiU/kPw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/[email protected]3.0':
resolution: {integrity: sha512-O/1ytYzflF16QDKXx4/qOXg1IuZp+n7hr9t+S0nv7N/2Tl8rJiNCshztV1gcSUvHbPtoX3+zmNbtSAyVbzxVfw==}
'@typescript-eslint/[email protected]4.0':
resolution: {integrity: sha512-MpnMrJCVNpP1iVL8NiHkQZgQqIMBH5ewDGUPBh1pqQXwFtMFjsl1M03QcYPXmv6stCKEiF0PN7CGbU1ZbXFzEA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/[email protected]3.0':
resolution: {integrity: sha512-InjlBkSdWceIwIBWSwS3ENUp+i0O02PGX3Zv2wnihWJC1WDVGvG7mTHuf8b57uAaITj94d6tRPDH+sUEtXdRQQ==}
'@typescript-eslint/[email protected]4.0':
resolution: {integrity: sha512-wL348k6l92DNG+kPP5rVpKwNBoz7a3xRZy3TPKc1uymQttd7u7gcMv3eENmcuh4CjC4mO3FTM0DYstFXMyDLuw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
'@typescript/native': npm:typescript@>=7.1.0-dev.20261009.1 || >=7.1.0-beta <7.1.0-dev
@@ -3587,15 +3587,15 @@ packages:
'@typescript/native':
optional: true
'@typescript-eslint/[email protected]3.0':
resolution: {integrity: sha512-j2SVJJvVkXdUL0WcEzo4vEH1mO1vIi8KlVukcYA2MgMZvYN2LlZR4PmsW+GTSxSW24j6Q/EP7+MOifLtg5hmsA==}
'@typescript-eslint/[email protected]4.0':
resolution: {integrity: sha512-IpWXPxXXomzxyTcvjhZJexgdvtTR1TooLAPpuxzaGqQ8BHll1lf4Ysp/BTE/l0U5TJ+x1j7B4bEM8pLRrvY+XA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/[email protected]3.0':
resolution: {integrity: sha512-k4lsFVpRZICbltkIEEH4hZRkwXkqDF1GHBpClKQOHQY+RkoZAAuyc1ci3I6p+CB6v3U4jaHIUshc4RzzQXZWLg==}
'@typescript-eslint/[email protected]4.0':
resolution: {integrity: sha512-XSZmOtMUbWCBIM+2BK134FyMFxmll1mW2mPLk/PSwYQYzGIPMgJAqL929U4qXVizLv7Xq5b7r41/o7Ombuwk0g==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript/[email protected]':
@@ -3838,8 +3838,8 @@ packages:
cpu: [x64]
os: [win32]
'@versatiles/[email protected].0':
resolution: {integrity: sha512-P2gLER3/VAOLGCMiumZ1hjHenlsAiI4mz1gPSak9ZAci0BgPYVfY+oo01MIYIfN4A+AvL1gfwZ3eC2vYQVqtlQ==}
'@versatiles/[email protected].1':
resolution: {integrity: sha512-JMOuqOq+uOX2PQZORX5rm0fxrvEx5KUvz/Oxr1JIOtuWRjdO5izpXPfg9/s+DeImd3Xpt8BG05X/hL5rkmY+9Q==}
engines: {node: '>=20'}
peerDependencies:
maplibre-gl: '>=5.5.0'
@@ -6197,8 +6197,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==}
memoize-one@6.0.0:
resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==}
memoize-one@7.0.0:
resolution: {integrity: sha512-2N/rFuzS9eTTDXVmo/PO86KmapXPCOqDgR3eOnmWW1NVW8YXGzXcTWMKiGq/VAsYVl42Pd8rQ2DMsoYunIATLw==}
[email protected]:
resolution: {integrity: sha512-+y4mDxU4rvXXu5UDSGCGNiesFmwCHuefGMoPCO1WYucNYj7DsLqrFaa2fXVI0H+NNiPTwwzKwspn9yTZqUGqng==}
@@ -7604,8 +7604,8 @@ packages:
resolution: {integrity: sha512-phPGCwqr2+Qo0fwniCE8e4pKnGu/yFb5nD5Y8bf0EEeiI5GklnACYA9GFy/DrAeRrKHXvHn+1SUsOWgJp6RO+g==}
engines: {node: '>= 0.4'}
[email protected]3.0:
resolution: {integrity: sha512-+EnKy9rkYPun4l+kG2bDuYWQ6y1tGVgdR/tY1U9AC6h21CjEwOoc7gsjwe0FXB8uWFzk4QiCFbuRWgX758PiAg==}
[email protected]4.0:
resolution: {integrity: sha512-OsWQlsedt1ZpZXfZZMNK3m4SoQONFFcy4h/uRznsCeRfVuEic3gh4KGUs2pJJ5o0Jj0Jr7keUHQGN1Ns9aDw7Q==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
@@ -10228,7 +10228,7 @@ snapshots:
leaflet: 1.9.4
maplibre-gl: 6.19.0
'@maplibre/maplibre-gl-style-spec@26.8.0':
'@maplibre/maplibre-gl-style-spec@26.9.0':
dependencies:
'@mapbox/jsonlint-lines-primitives': 2.0.3
'@mapbox/unitbezier': 1.0.0
@@ -11443,14 +11443,14 @@ snapshots:
dependencies:
'@types/node': 24.19.2
'@typescript-eslint/[email protected]3.0(@typescript-eslint/[email protected]3.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected])':
'@typescript-eslint/[email protected]4.0(@typescript-eslint/[email protected]4.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected])':
dependencies:
'@eslint-community/regexpp': 4.12.2
'@typescript-eslint/parser': 8.73.0([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/scope-manager': 8.73.0
'@typescript-eslint/type-utils': 8.73.0([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/utils': 8.73.0([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/visitor-keys': 8.73.0
'@typescript-eslint/parser': 8.74.0([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/scope-manager': 8.74.0
'@typescript-eslint/type-utils': 8.74.0([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/utils': 8.74.0([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/visitor-keys': 8.74.0
eslint: 10.15.0([email protected])
ignore: 7.0.6
natural-compare: 1.4.0
@@ -11460,12 +11460,12 @@ snapshots:
- '@typescript/native'
- supports-color
'@typescript-eslint/[email protected]3.0([email protected]([email protected]))([email protected])([email protected])([email protected])':
'@typescript-eslint/[email protected]4.0([email protected]([email protected]))([email protected])([email protected])([email protected])':
dependencies:
'@typescript-eslint/scope-manager': 8.73.0
'@typescript-eslint/types': 8.73.0
'@typescript-eslint/typescript-estree': 8.73.0([email protected])([email protected])([email protected])
'@typescript-eslint/visitor-keys': 8.73.0
'@typescript-eslint/scope-manager': 8.74.0
'@typescript-eslint/types': 8.74.0
'@typescript-eslint/typescript-estree': 8.74.0([email protected])([email protected])([email protected])
'@typescript-eslint/visitor-keys': 8.74.0
debug: 4.4.3([email protected])
eslint: 10.15.0([email protected])
typescript: 6.0.3
@@ -11473,29 +11473,29 @@ snapshots:
- '@typescript/native'
- supports-color
'@typescript-eslint/[email protected]3.0([email protected])([email protected])':
'@typescript-eslint/[email protected]4.0([email protected])([email protected])':
dependencies:
'@typescript-eslint/tsconfig-utils': 8.73.0([email protected])
'@typescript-eslint/types': 8.73.0
'@typescript-eslint/tsconfig-utils': 8.74.0([email protected])
'@typescript-eslint/types': 8.74.0
debug: 4.4.3([email protected])
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/[email protected]3.0':
'@typescript-eslint/[email protected]4.0':
dependencies:
'@typescript-eslint/types': 8.73.0
'@typescript-eslint/visitor-keys': 8.73.0
'@typescript-eslint/types': 8.74.0
'@typescript-eslint/visitor-keys': 8.74.0
'@typescript-eslint/[email protected]3.0([email protected])':
'@typescript-eslint/[email protected]4.0([email protected])':
dependencies:
typescript: 6.0.3
'@typescript-eslint/[email protected]3.0([email protected]([email protected]))([email protected])([email protected])([email protected])':
'@typescript-eslint/[email protected]4.0([email protected]([email protected]))([email protected])([email protected])([email protected])':
dependencies:
'@typescript-eslint/types': 8.73.0
'@typescript-eslint/typescript-estree': 8.73.0([email protected])([email protected])([email protected])
'@typescript-eslint/utils': 8.73.0([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/types': 8.74.0
'@typescript-eslint/typescript-estree': 8.74.0([email protected])([email protected])([email protected])
'@typescript-eslint/utils': 8.74.0([email protected]([email protected]))([email protected])([email protected])([email protected])
debug: 4.4.3([email protected])
eslint: 10.15.0([email protected])
ts-api-utils: 2.5.0([email protected])
@@ -11504,14 +11504,14 @@ snapshots:
- '@typescript/native'
- supports-color
'@typescript-eslint/[email protected]3.0': {}
'@typescript-eslint/[email protected]4.0': {}
'@typescript-eslint/[email protected]3.0([email protected])([email protected])([email protected])':
'@typescript-eslint/[email protected]4.0([email protected])([email protected])([email protected])':
dependencies:
'@typescript-eslint/project-service': 8.73.0([email protected])([email protected])
'@typescript-eslint/tsconfig-utils': 8.73.0([email protected])
'@typescript-eslint/types': 8.73.0
'@typescript-eslint/visitor-keys': 8.73.0
'@typescript-eslint/project-service': 8.74.0([email protected])([email protected])
'@typescript-eslint/tsconfig-utils': 8.74.0([email protected])
'@typescript-eslint/types': 8.74.0
'@typescript-eslint/visitor-keys': 8.74.0
debug: 4.4.3([email protected])
minimatch: 11.0.5
semver: 7.8.5
@@ -11523,21 +11523,21 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/[email protected]3.0([email protected]([email protected]))([email protected])([email protected])([email protected])':
'@typescript-eslint/[email protected]4.0([email protected]([email protected]))([email protected])([email protected])([email protected])':
dependencies:
'@eslint-community/eslint-utils': 4.10.1([email protected]([email protected]))
'@typescript-eslint/scope-manager': 8.73.0
'@typescript-eslint/types': 8.73.0
'@typescript-eslint/typescript-estree': 8.73.0([email protected])([email protected])([email protected])
'@typescript-eslint/scope-manager': 8.74.0
'@typescript-eslint/types': 8.74.0
'@typescript-eslint/typescript-estree': 8.74.0([email protected])([email protected])([email protected])
eslint: 10.15.0([email protected])
typescript: 6.0.3
transitivePeerDependencies:
- '@typescript/native'
- supports-color
'@typescript-eslint/[email protected]3.0':
'@typescript-eslint/[email protected]4.0':
dependencies:
'@typescript-eslint/types': 8.73.0
'@typescript-eslint/types': 8.74.0
eslint-visitor-keys: 5.0.1
'@typescript/[email protected]':
@@ -11670,9 +11670,9 @@ snapshots:
'@unrs/[email protected]':
optional: true
'@versatiles/[email protected].0([email protected])':
'@versatiles/[email protected].1([email protected])':
dependencies:
'@maplibre/maplibre-gl-style-spec': 26.8.0
'@maplibre/maplibre-gl-style-spec': 26.9.0
optionalDependencies:
maplibre-gl: 6.19.0
@@ -12870,9 +12870,9 @@ snapshots:
transitivePeerDependencies:
- supports-color
[email protected](@typescript-eslint/[email protected]3.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected]):
[email protected](@typescript-eslint/[email protected]4.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected]):
dependencies:
'@typescript-eslint/types': 8.73.0
'@typescript-eslint/types': 8.74.0
cjs-module-lexer: 2.3.0
comment-parser: 1.4.8
debug: 4.4.3([email protected])
@@ -12885,7 +12885,7 @@ snapshots:
stable-hash-x: 0.2.0
unrs-resolver: 1.12.2
optionalDependencies:
'@typescript-eslint/utils': 8.73.0([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/utils': 8.74.0([email protected]([email protected]))([email protected])([email protected])([email protected])
transitivePeerDependencies:
- supports-color
@@ -12909,11 +12909,11 @@ snapshots:
parse5: 8.1.0
parse5-htmlparser2-tree-adapter: 8.0.1
[email protected](@typescript-eslint/[email protected]3.0(@typescript-eslint/[email protected]3.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected])):
[email protected](@typescript-eslint/[email protected]4.0(@typescript-eslint/[email protected]4.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected])):
dependencies:
eslint: 10.15.0([email protected])
optionalDependencies:
'@typescript-eslint/eslint-plugin': 8.73.0(@typescript-eslint/[email protected]3.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/eslint-plugin': 8.74.0(@typescript-eslint/[email protected]4.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected])
[email protected]([email protected]([email protected])):
dependencies:
@@ -14150,7 +14150,7 @@ snapshots:
'@mapbox/unitbezier': 1.0.0
'@mapbox/vector-tile': 3.0.0
'@maplibre/geojson-vt': 6.3.2
'@maplibre/maplibre-gl-style-spec': 26.8.0
'@maplibre/maplibre-gl-style-spec': 26.9.0
'@maplibre/mlt': 1.3.0
'@maplibre/vt-pbf': 4.3.3
'@types/geojson': 7946.0.16
@@ -14180,7 +14180,7 @@ snapshots:
[email protected]: {}
memoize-one@6.0.0: {}
memoize-one@7.0.0: {}
[email protected]: {}
@@ -15748,12 +15748,12 @@ snapshots:
possible-typed-array-names: 1.1.0
reflect.getprototypeof: 1.0.10
[email protected]3.0([email protected]([email protected]))([email protected])([email protected])([email protected]):
[email protected]4.0([email protected]([email protected]))([email protected])([email protected])([email protected]):
dependencies:
'@typescript-eslint/eslint-plugin': 8.73.0(@typescript-eslint/[email protected]3.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/parser': 8.73.0([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/typescript-estree': 8.73.0([email protected])([email protected])([email protected])
'@typescript-eslint/utils': 8.73.0([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/eslint-plugin': 8.74.0(@typescript-eslint/[email protected]4.0([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/parser': 8.74.0([email protected]([email protected]))([email protected])([email protected])([email protected])
'@typescript-eslint/typescript-estree': 8.74.0([email protected])([email protected])([email protected])
'@typescript-eslint/utils': 8.74.0([email protected]([email protected]))([email protected])([email protected])([email protected])
eslint: 10.15.0([email protected])
typescript: 6.0.3
transitivePeerDependencies:
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "home-assistant-frontend"
version = "20261125.1"
version = "20261125.0"
license = "Apache-2.0"
license-files = ["LICENSE*"]
description = "The Home Assistant frontend"
+2 -2
View File
@@ -126,9 +126,9 @@
"matchPackageNames": ["echarts", "zrender"]
},
{
"description": "Group formatjs monorepo package",
"description": "Group formatjs monorepo packages",
"groupName": "formatjs",
"matchPackageNames": ["@formatjs/**"]
"matchPackageNames": ["@formatjs/**", "intl-messageformat"]
},
{
"description": "Group Playwright package and CI container updates",
+3 -2
View File
@@ -235,7 +235,7 @@ export class HaCameraPlayer extends LitElement {
const aspectRatio = this._aspectRatio();
if (aspectRatio !== this._firedAspectRatio) {
this._firedAspectRatio = aspectRatio;
fireEvent(this, "camera-aspect-ratio-changed", { aspectRatio });
fireEvent(this, "media-size-changed", { aspectRatio });
}
if (changedProps.has("keepAwake")) {
if (this.keepAwake) {
@@ -1189,6 +1189,7 @@ declare global {
"ha-camera-player": HaCameraPlayer;
}
interface HASSDomEvents {
"camera-aspect-ratio-changed": { aspectRatio: number };
/** The natural width limits the picture's width when it is set */
"media-size-changed": { aspectRatio: number; naturalWidth?: number };
}
}
@@ -328,6 +328,11 @@ export function generateStatisticsChartData(
: undefined,
color: chartType === "bar" ? backgroundColor : borderColor,
};
if (chartType === "bar") {
// echarts sizes bars from the smallest gap between points, so sparse
// data (one point, or points far apart) gets huge bars without a cap
(series as BarSeriesOption).barMaxWidth = 50;
}
if (chartStacked) {
series.stack = `band-stacked`;
series.stackStrategy = "samesign";
+17 -9
View File
@@ -179,6 +179,10 @@ export class HaControlCircularSlider extends LitElement {
disconnectedCallback(): void {
super.disconnectedCallback();
this._destroyListeners();
if (this._activeSlider) {
this._cancelInteraction();
}
}
private _managers: HammerManager[] = [];
@@ -248,6 +252,18 @@ export class HaControlCircularSlider extends LitElement {
return undefined;
}
private _cancelInteraction() {
if (this._activeSlider) {
fireEvent(this, `${this._activeSlider}-changing`, {
value: undefined,
});
}
this._activeSlider = undefined;
this._localValue = this.value;
this._localLow = this.low;
this._localHigh = this.high;
}
private _setupListeners() {
if (this._interactions && this._managers.length === 0) {
this._interactions.forEach((interaction) => {
@@ -279,15 +295,7 @@ export class HaControlCircularSlider extends LitElement {
mc.add(new Tap({ event: "singletap" }));
const cancelInteraction = () => {
if (this._activeSlider) {
fireEvent(this, `${this._activeSlider}-changing`, {
value: undefined,
});
}
this._activeSlider = undefined;
this._localValue = this.value;
this._localLow = this.low;
this._localHigh = this.high;
this._cancelInteraction();
if (pressToActivate) {
panRecognizer.set({ enable: false });
}
+1 -1
View File
@@ -45,7 +45,7 @@ function adjustRgb(
if (wv != null) {
return rgbw2rgb([...rgb, wv] as [number, number, number, number]);
}
if (cw != null && ww !== null) {
if (cw != null && ww != null) {
return rgbww2rgb(
[...rgb, cw, ww] as [number, number, number, number, number],
minKelvin,
@@ -2,6 +2,8 @@ import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { consume } from "../../../common/decorators/consume";
import { transform } from "../../../common/decorators/transform";
import type { HASSDomCurrentTargetEvent } from "../../../common/dom/fire_event";
import { fireEvent } from "../../../common/dom/fire_event";
import { connectionContext, formattersContext } from "../../../data/context";
import type { ImageEntity } from "../../../data/image";
import { computeImageUrl } from "../../../data/image";
@@ -28,6 +30,17 @@ class MoreInfoImage extends LitElement {
@property({ attribute: false }) public stateObj?: ImageEntity;
private _size?: HASSDomEvents["media-size-changed"];
public connectedCallback() {
super.connectedCallback();
// A cached view that was detached while the picture loaded couldn't send
// its size, and the picture doesn't load again when it's shown
if (this._size) {
fireEvent(this, "media-size-changed", this._size);
}
}
protected render() {
if (!this._connection || !this.stateObj) {
return nothing;
@@ -39,16 +52,28 @@ class MoreInfoImage extends LitElement {
return html`<img
alt=${this._formatEntityName?.(this.stateObj) || this.stateObj.entity_id}
src=${this._connection.hassUrl(imageUrl)}
@load=${this._imageLoaded}
/> `;
}
private _imageLoaded(ev: HASSDomCurrentTargetEvent<HTMLImageElement>) {
const { naturalWidth, naturalHeight } = ev.currentTarget;
if (!naturalWidth || !naturalHeight) {
return;
}
this._size = { aspectRatio: naturalWidth / naturalHeight, naturalWidth };
fireEvent(this, "media-size-changed", this._size);
}
static styles = css`
:host {
display: block;
text-align: center;
}
img {
display: block;
margin: 0 auto;
max-width: 100%;
max-height: var(--more-info-media-max-height, none);
}
`;
}
+69 -47
View File
@@ -149,10 +149,12 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
@property({ type: Boolean, reflect: true }) public large = false;
@state() private _fill = false;
// The dialog grows with the camera's or image's picture, as high as there
// is room for
@state() private _mediaAspectRatio?: number;
// The dialog grows with the camera's picture, as high as there is room for
@state() private _cameraAspectRatio?: number;
// An image is not shown larger than it is
@state() private _mediaNaturalWidth?: number;
// Height of the controls the camera's info shows below the picture
@state() private _cameraControlsHeight?: string;
@@ -196,12 +198,6 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
}
public showDialog(params: MoreInfoDialogParams) {
// The camera player keeps running for the same entity and doesn't send
// its size again
if (params.entityId !== this._entityId) {
this._cameraAspectRatio = undefined;
this._cameraControlsHeight = undefined;
}
this._entityId = params.entityId;
if (!this._entityId) {
this.closeDialog();
@@ -219,7 +215,6 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
this._detailsYamlMode = false;
this.large = params.large ?? false;
this._fill = false;
this._open = true;
this._loadEntityRegistryEntry();
}
@@ -265,8 +260,6 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
this._currView = DEFAULT_VIEW;
this._childViewStack = [];
this._returnUrl = undefined;
this._cameraAspectRatio = undefined;
this._cameraControlsHeight = undefined;
this._isEscapeEnabled = true;
window.removeEventListener("dialog-closed", this._enableEscapeKeyClose);
window.removeEventListener("show-dialog", this._disableEscapeKeyClose);
@@ -691,30 +684,32 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
`
: nothing;
// Also when the camera was opened from a smaller entity's related view
const cameraAspectRatio =
domain === "camera" && isDefaultView
? this._cameraAspectRatio
// Also when it was opened from a smaller entity's related view
const mediaAspectRatio =
(domain === "camera" || domain === "image") && isDefaultView
? this._mediaAspectRatio
: undefined;
// As wide as the picture is when it's as high as there is room for
const fullHeightWidth = `var(--more-info-media-max-height) * ${mediaAspectRatio}`;
const mediaPictureWidth = this._mediaNaturalWidth
? `min(${fullHeightWidth}, ${this._mediaNaturalWidth}px)`
: fullHeightWidth;
return html`
<ha-adaptive-dialog
.open=${this._open}
.width=${
this._fill
? "full"
: this.large || cameraAspectRatio
? "large"
: "medium"
}
class=${classMap({ camera: domain === "camera" })}
.width=${this.large || mediaAspectRatio ? "large" : "medium"}
class=${classMap({
camera: domain === "camera",
image: domain === "image",
})}
style=${styleMap({
"--more-info-camera-controls-height": this._cameraControlsHeight,
"--ha-dialog-width-lg": cameraAspectRatio
? `clamp(var(--ha-dialog-width-md, 580px), calc(var(--video-max-height) * ${cameraAspectRatio}), 1920px)`
"--ha-dialog-width-lg": mediaAspectRatio
? `clamp(var(--ha-dialog-width-md, 580px), calc(${mediaPictureWidth} + var(--more-info-media-inline-padding, 0px)), 1920px)`
: undefined,
})}
@camera-aspect-ratio-changed=${this._cameraAspectRatioChanged}
@media-size-changed=${this._mediaSizeChanged}
@camera-controls-height-changed=${this._cameraControlsHeightChanged}
.accessibleLabel=${title}
@closed=${this._dialogClosed}
@@ -747,7 +742,7 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
></ha-icon-button-prev>
`
}
<span slot="headerTitle" @click=${this._enlarge} class="title">
<span slot="headerTitle" class="title">
${
breadcrumb.length > 0
? !__DEMO__ && isAdmin
@@ -1071,6 +1066,17 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
`;
}
protected willUpdate(changedProps: PropertyValues) {
super.willUpdate(changedProps);
// Also when going to a related entity or back. The camera player or image
// of the same entity keeps running and doesn't send its size again.
if (changedProps.has("_entityId")) {
this._mediaAspectRatio = undefined;
this._mediaNaturalWidth = undefined;
this._cameraControlsHeight = undefined;
}
}
protected firstUpdated(changedProps: PropertyValues<this>) {
super.firstUpdated(changedProps);
this.addEventListener("close-dialog", () => this.closeDialog());
@@ -1140,10 +1146,11 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
this._entry = ev.detail;
}
private _cameraAspectRatioChanged(
ev: HASSDomEvent<HASSDomEvents["camera-aspect-ratio-changed"]>
private _mediaSizeChanged(
ev: HASSDomEvent<HASSDomEvents["media-size-changed"]>
) {
this._cameraAspectRatio = ev.detail.aspectRatio;
this._mediaAspectRatio = ev.detail.aspectRatio;
this._mediaNaturalWidth = ev.detail.naturalWidth;
}
private _cameraControlsHeightChanged(
@@ -1152,12 +1159,6 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
this._cameraControlsHeight = ev.detail.height;
}
private _enlarge() {
withViewTransition(() => {
this._fill = !this._fill;
});
}
private _handleOpened() {
window.addEventListener("dialog-closed", this._enableEscapeKeyClose);
window.addEventListener("show-dialog", this._disableEscapeKeyClose);
@@ -1216,12 +1217,14 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
--dialog-content-padding: 0;
}
/* The dialog's margin, its header of about 68px and the controls
below the picture */
ha-adaptive-dialog.camera {
--video-max-height: calc(
100vh - var(--ha-space-20) -
68px - var(--more-info-camera-controls-height, 0px)
/* The dialog's margin, the safe area like the dialog's height limit,
its header of about 68px and what the info shows besides the
picture */
ha-adaptive-dialog.camera,
ha-adaptive-dialog.image {
--more-info-media-max-height: calc(
100vh - var(--ha-space-20) - var(--safe-area-inset-y, 0px) -
68px - var(--more-info-media-reserved-height, 0px)
);
/* Along with the height of the picture */
--ha-dialog-width-transition:
@@ -1232,14 +1235,33 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
/* A custom property takes any value, so it can't fall back to the
declaration before it. svh like the height limit of the dialog. */
@supports (height: 1svh) {
ha-adaptive-dialog.camera {
--video-max-height: calc(
100svh - var(--ha-space-20) -
68px - var(--more-info-camera-controls-height, 0px)
ha-adaptive-dialog.camera,
ha-adaptive-dialog.image {
--more-info-media-max-height: calc(
100svh - var(--ha-space-20) - var(--safe-area-inset-y, 0px) -
68px - var(--more-info-media-reserved-height, 0px)
);
}
}
ha-adaptive-dialog.camera {
--more-info-media-reserved-height: var(
--more-info-camera-controls-height,
0px
);
--video-max-height: var(--more-info-media-max-height);
}
/* The info's padding around the picture and the entity's row of 40px
above it, with 16px between them */
ha-adaptive-dialog.image {
--more-info-media-reserved-height: calc(
var(--ha-space-6) +
max(var(--safe-area-inset-bottom, 0px), var(--ha-space-6)) + 56px
);
--more-info-media-inline-padding: calc(var(--ha-space-6) * 2);
}
.content-wrapper {
flex: 1 1 auto;
min-height: 0;
@@ -2,6 +2,7 @@ import type { HassEntity } from "home-assistant-js-websocket";
import type { PropertyValues } from "lit";
import { html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { live } from "lit/directives/live";
import { consume } from "../../../common/decorators/consume";
import {
consumeEntityState,
@@ -139,7 +140,7 @@ class HuiNumericInputCardFeature
return html`
<ha-control-number-buttons
.label=${label}
.value=${value}
.value=${live(value)}
.min=${stateObj.attributes.min}
.max=${stateObj.attributes.max}
.step=${stateObj.attributes.step}
@@ -153,7 +154,7 @@ class HuiNumericInputCardFeature
return html`
<ha-control-slider
.label=${label}
.value=${value}
.value=${live(value)}
.min=${stateObj.attributes.min}
.max=${stateObj.attributes.max}
.step=${stateObj.attributes.step}
@@ -0,0 +1,145 @@
import type { HassEntity } from "home-assistant-js-websocket";
import type { PropertyValues } from "lit";
import { LitElement, css, html, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { styleMap } from "lit/directives/style-map";
import { consume } from "../../../common/decorators/consume";
import durationToSeconds from "../../../common/datetime/duration_to_seconds";
import { consumeEntityState } from "../../../common/decorators/consume-context-entry";
import { computeDomain } from "../../../common/entity/compute_domain";
import type { HomeAssistant } from "../../../types";
import type { LovelaceCardFeature } from "../types";
import { cardFeatureStyles } from "./common/card-feature-styles";
import type {
LovelaceCardFeatureContext,
TimerProgressCardFeatureConfig,
} from "./types";
import { TimerRemainingTimeController } from "../../../common/controllers/timer-remaining-time-controller";
import { reducedMotionContext } from "../../../data/context";
export const supportsTimerProgressCardFeature = (
hass: HomeAssistant,
context: LovelaceCardFeatureContext
) => {
const stateObj = context.entity_id
? hass.states[context.entity_id]
: undefined;
return !!stateObj && computeDomain(stateObj.entity_id) === "timer";
};
@customElement("hui-timer-progress-card-feature")
class HuiTimerProgressCardFeature
extends LitElement
implements LovelaceCardFeature
{
@property({ attribute: false }) public context?: LovelaceCardFeatureContext;
@state()
@consumeEntityState({ entityIdPath: ["context", "entity_id"] })
private _stateObj?: HassEntity;
@state()
@consume({ context: reducedMotionContext, subscribe: true })
private _reducedMotion = false;
@state() private _config?: TimerProgressCardFeatureConfig;
private _timeRemaining = new TimerRemainingTimeController(this);
private _prevRatio = 0;
private _animate = false;
static getStubConfig(): TimerProgressCardFeatureConfig {
return { type: "timer-progress" };
}
public setConfig(config: TimerProgressCardFeatureConfig): void {
if (!config) {
throw new Error("Invalid configuration");
}
this._config = config;
}
protected update(changedProps: PropertyValues): void {
if (changedProps.has("_stateObj")) {
this._timeRemaining.setStateObj(this._stateObj);
}
if (this._stateObj) {
const ratio = this._ratio(this._stateObj);
this._animate =
!this._reducedMotion &&
this._stateObj.state === "active" &&
ratio <= this._prevRatio;
this._prevRatio = ratio;
}
super.update(changedProps);
}
private _ratio(stateObj: HassEntity, offset = 0): number {
const { duration } = stateObj.attributes;
const total =
typeof duration === "string" ? durationToSeconds(duration) : 0;
if (!total || stateObj.state === "idle") {
return 0;
}
const left = (this._timeRemaining.timeRemaining ?? 0) - offset;
return Math.min(Math.max(left / total, 0), 1);
}
protected render() {
if (
!this._config ||
!this.context ||
!this._stateObj ||
computeDomain(this._stateObj.entity_id) !== "timer"
) {
return nothing;
}
const stateObj = this._stateObj;
const ratio = this._ratio(stateObj);
const target = this._animate ? this._ratio(stateObj, 1) : ratio;
return html`
<div
class="track"
role="progressbar"
aria-label=${stateObj.attributes.friendly_name || stateObj.entity_id}
aria-valuemin="0"
aria-valuemax="100"
aria-valuenow=${Math.round(ratio * 100)}
>
<div
class="bar"
style=${styleMap({
transform: `scaleX(${target})`,
transition: this._animate ? "transform 1s linear" : "none",
})}
></div>
</div>
`;
}
static styles = [
cardFeatureStyles,
css`
:host {
pointer-events: none !important;
}
.track {
height: var(--feature-height);
border-radius: var(--feature-border-radius);
background: color-mix(in srgb, var(--feature-color) 20%, transparent);
overflow: hidden;
}
.bar {
height: 100%;
width: 100%;
transform-origin: var(--float-start, left);
background: var(--feature-color);
}
`,
];
}
declare global {
interface HTMLElementTagNameMap {
"hui-timer-progress-card-feature": HuiTimerProgressCardFeature;
}
}
@@ -43,6 +43,7 @@ import { supportsTargetHumidityCardFeature } from "./hui-target-humidity-card-fe
import { supportsTargetTemperatureCardFeature } from "./hui-target-temperature-card-feature";
import { supportsTimerActionsCardFeature } from "./hui-timer-actions-card-feature";
import { supportsTimerPresetsCardFeature } from "./hui-timer-presets-card-feature";
import { supportsTimerProgressCardFeature } from "./hui-timer-progress-card-feature";
import { supportsToggleCardFeature } from "./hui-toggle-card-feature";
import { supportsTrendGraphCardFeature } from "./hui-trend-graph-card-feature";
import { supportsUpdateActionsCardFeature } from "./hui-update-actions-card-feature";
@@ -110,6 +111,7 @@ export const UI_FEATURE_TYPES = [
"target-temperature",
"timer-actions",
"timer-presets",
"timer-progress",
"toggle",
"update-actions",
"vacuum-commands",
@@ -169,6 +171,7 @@ export const SUPPORTS_FEATURE_TYPES: Record<UiFeatureType, SupportsFeature> = {
"temperature-forecast": supportsTemperatureForecastCardFeature,
"timer-actions": supportsTimerActionsCardFeature,
"timer-presets": supportsTimerPresetsCardFeature,
"timer-progress": supportsTimerProgressCardFeature,
toggle: supportsToggleCardFeature,
"update-actions": supportsUpdateActionsCardFeature,
"vacuum-commands": supportsVacuumCommandsCardFeature,
@@ -237,6 +237,10 @@ export interface TimerPresetsCardFeatureConfig {
style?: "buttons" | "dropdown";
}
export interface TimerProgressCardFeatureConfig {
type: "timer-progress";
}
export interface WaterHeaterOperationModesCardFeatureConfig {
type: "water-heater-operation-modes";
style?: "dropdown" | "icons";
@@ -406,6 +410,7 @@ export type LovelaceCardFeatureConfig =
| TargetTemperatureCardFeatureConfig
| TimerActionsCardFeatureConfig
| TimerPresetsCardFeatureConfig
| TimerProgressCardFeatureConfig
| ToggleCardFeatureConfig
| UpdateActionsCardFeatureConfig
| VacuumCommandsCardFeatureConfig
@@ -84,7 +84,7 @@ const DOMAIN_VARIANTS: Record<string, TileVariant[]> = {
],
alarm_control_panel: [TILE_VARIANT, ["alarm-modes"]],
counter: [TILE_VARIANT, ["counter-actions"]],
timer: [TILE_VARIANT, ["timer-actions"]],
timer: [TILE_VARIANT, ["timer-actions"], ["timer-progress"]],
input_select: SELECT_VARIANTS,
select: SELECT_VARIANTS,
input_number: NUMERIC_INPUT_VARIANTS,
@@ -38,6 +38,7 @@ import "../card-features/hui-target-humidity-card-feature";
import "../card-features/hui-target-temperature-card-feature";
import "../card-features/hui-timer-actions-card-feature";
import "../card-features/hui-timer-presets-card-feature";
import "../card-features/hui-timer-progress-card-feature";
import "../card-features/hui-toggle-card-feature";
import "../card-features/hui-update-actions-card-feature";
import "../card-features/hui-vacuum-commands-card-feature";
@@ -104,6 +105,7 @@ const TYPES = new Set<LovelaceCardFeatureConfig["type"]>([
"temperature-forecast",
"timer-actions",
"timer-presets",
"timer-progress",
"toggle",
"update-actions",
"vacuum-commands",
@@ -1,4 +1,9 @@
import { mdiClose, mdiHelpCircleOutline } from "@mdi/js";
import {
mdiClose,
mdiFullscreen,
mdiFullscreenExit,
mdiHelpCircleOutline,
} from "@mdi/js";
import deepFreeze from "deep-freeze";
import type { CSSResultGroup, PropertyValues } from "lit";
import { css, html, LitElement, nothing } from "lit";
@@ -68,6 +73,8 @@ export class HuiDialogEditBadge
@state() private _open = false;
@state() private _animateWidth = false;
@state() private _badgeConfig?: LovelaceBadgeConfig;
@state() private _saving = false;
@@ -195,6 +202,8 @@ export class HuiDialogEditBadge
.open=${this._open}
.accessibleLabel=${heading}
.width=${this.large ? "full" : "large"}
class=${this._animateWidth ? "animate-width" : ""}
@dialog-set-fullscreen=${this._stopWidthAnimation}
.preventScrimClose=${this.isEffectiveDirtyState}
@keydown=${this._ignoreKeydown}
@closed=${this._dialogClosed}
@@ -205,12 +214,18 @@ export class HuiDialogEditBadge
.label=${this.hass.localize("ui.common.close")}
.path=${mdiClose}
></ha-icon-button>
<span
slot="headerTitle"
class="title-enlargeable"
@click=${this._enlarge}
>${heading}</span
>
<span slot="headerTitle">${heading}</span>
<ha-icon-button
slot="headerActionItems"
class="enlarge"
.path=${this.large ? mdiFullscreenExit : mdiFullscreen}
.label=${this.hass.localize(
this.large
? "ui.panel.lovelace.editor.edit_badge.shrink"
: "ui.panel.lovelace.editor.edit_badge.enlarge"
)}
@click=${this._toggleLarge}
></ha-icon-button>
${
this._documentationURL !== undefined
? html`
@@ -304,10 +319,14 @@ export class HuiDialogEditBadge
`;
}
private _enlarge() {
withViewTransition(() => {
this.large = !this.large;
});
private _toggleLarge() {
this._animateWidth = true;
this.large = !this.large;
}
// The code editor's fullscreen changes the height at once, so the width must not lag behind
private _stopWidthAnimation() {
this._animateWidth = false;
}
private _ignoreKeydown(ev: KeyboardEvent) {
@@ -494,8 +513,18 @@ export class HuiDialogEditBadge
ha-dialog ha-icon-button[slot="headerActionItems"] {
color: var(--secondary-text-color);
}
.title-enlargeable {
display: block;
ha-dialog.animate-width {
--ha-dialog-width-transition:
min-width var(--ha-animation-duration-normal) ease-out,
max-width var(--ha-animation-duration-normal) ease-out;
}
ha-dialog[fullscreen] .enlarge {
display: none;
}
@media (max-width: 999px) {
.enlarge {
display: none;
}
}
`,
];
@@ -1,4 +1,9 @@
import { mdiClose, mdiHelpCircleOutline } from "@mdi/js";
import {
mdiClose,
mdiFullscreen,
mdiFullscreenExit,
mdiHelpCircleOutline,
} from "@mdi/js";
import deepFreeze from "deep-freeze";
import type { CSSResultGroup, PropertyValues } from "lit";
import { LitElement, css, html, nothing } from "lit";
@@ -76,6 +81,8 @@ export class HuiDialogEditCard
@state() private _open = false;
@state() private _animateWidth = false;
@state() private _cardConfig?: LovelaceCardConfig;
@state() private _sectionConfig?: LovelaceSectionConfig;
@@ -207,6 +214,8 @@ export class HuiDialogEditCard
.open=${this._open}
.accessibleLabel=${heading}
.width=${this.large ? "full" : "large"}
class=${this._animateWidth ? "animate-width" : ""}
@dialog-set-fullscreen=${this._stopWidthAnimation}
.preventScrimClose=${this.isEffectiveDirtyState}
@keydown=${this._ignoreKeydown}
@closed=${this._dialogClosed}
@@ -217,12 +226,18 @@ export class HuiDialogEditCard
.label=${this.hass.localize("ui.common.close")}
.path=${mdiClose}
></ha-icon-button>
<span
slot="headerTitle"
class="title-enlargeable"
@click=${this._enlarge}
>${heading}</span
>
<span slot="headerTitle">${heading}</span>
<ha-icon-button
slot="headerActionItems"
class="enlarge"
.path=${this.large ? mdiFullscreenExit : mdiFullscreen}
.label=${this.hass.localize(
this.large
? "ui.panel.lovelace.editor.edit_card.shrink"
: "ui.panel.lovelace.editor.edit_card.enlarge"
)}
@click=${this._toggleLarge}
></ha-icon-button>
${
this._documentationURL !== undefined
? html`
@@ -330,10 +345,14 @@ export class HuiDialogEditCard
`;
}
private _enlarge() {
withViewTransition(() => {
this.large = !this.large;
});
private _toggleLarge() {
this._animateWidth = true;
this.large = !this.large;
}
// The code editor's fullscreen changes the height at once, so the width must not lag behind
private _stopWidthAnimation() {
this._animateWidth = false;
}
private _ignoreKeydown(ev: KeyboardEvent) {
@@ -576,8 +595,18 @@ export class HuiDialogEditCard
ha-dialog ha-icon-button[slot="headerActionItems"] {
color: var(--secondary-text-color);
}
.title-enlargeable {
display: block;
ha-dialog.animate-width {
--ha-dialog-width-transition:
min-width var(--ha-animation-duration-normal) ease-out,
max-width var(--ha-animation-duration-normal) ease-out;
}
ha-dialog[fullscreen] .enlarge {
display: none;
}
@media (max-width: 999px) {
.enlarge {
display: none;
}
}
`,
];
@@ -67,6 +67,7 @@ import { supportsTargetHumidityCardFeature } from "../../card-features/hui-targe
import { supportsTargetTemperatureCardFeature } from "../../card-features/hui-target-temperature-card-feature";
import { supportsTimerActionsCardFeature } from "../../card-features/hui-timer-actions-card-feature";
import { supportsTimerPresetsCardFeature } from "../../card-features/hui-timer-presets-card-feature";
import { supportsTimerProgressCardFeature } from "../../card-features/hui-timer-progress-card-feature";
import { supportsToggleCardFeature } from "../../card-features/hui-toggle-card-feature";
import { supportsTrendGraphCardFeature } from "../../card-features/hui-trend-graph-card-feature";
import { supportsUpdateActionsCardFeature } from "../../card-features/hui-update-actions-card-feature";
@@ -136,6 +137,7 @@ const UI_FEATURE_TYPES = [
"temperature-forecast",
"timer-actions",
"timer-presets",
"timer-progress",
"toggle",
"update-actions",
"vacuum-commands",
@@ -239,6 +241,7 @@ const SUPPORTS_FEATURE_TYPES: Record<
"temperature-forecast": supportsTemperatureForecastCardFeature,
"timer-actions": supportsTimerActionsCardFeature,
"timer-presets": supportsTimerPresetsCardFeature,
"timer-progress": supportsTimerProgressCardFeature,
toggle: supportsToggleCardFeature,
"update-actions": supportsUpdateActionsCardFeature,
"vacuum-commands": supportsVacuumCommandsCardFeature,
@@ -1,6 +1,7 @@
import type { PropertyValues } from "lit";
import { LitElement, css, html, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { live } from "lit/directives/live";
import { debounce } from "../../../common/util/debounce";
import "../../../components/ha-slider";
import "../../../components/input/ha-input";
@@ -88,7 +89,7 @@ class HuiNumberEntityRow extends LitElement implements LovelaceRow {
.step=${Number(stateObj.attributes.step)}
.min=${Number(stateObj.attributes.min)}
.max=${Number(stateObj.attributes.max)}
.value=${Number(stateObj.state)}
.value=${live(Number(stateObj.state))}
@change=${this._selectedValueChanged}
></ha-slider>
<span class="state">
@@ -111,7 +112,7 @@ class HuiNumberEntityRow extends LitElement implements LovelaceRow {
.step=${Number(stateObj.attributes.step)}
.min=${Number(stateObj.attributes.min)}
.max=${Number(stateObj.attributes.max)}
.value=${Number(stateObj.state).toString()}
.value=${live(Number(stateObj.state).toString())}
type="number"
@change=${this._selectedValueChanged}
>
+1 -10
View File
@@ -1,7 +1,6 @@
import type { PropertyValues } from "lit";
import type { HASSDomEvent } from "../common/dom/fire_event";
import { mainWindow } from "../common/dom/get_main_window";
import { computeDomain } from "../common/entity/compute_domain";
import { replaceCurrentUrl } from "../common/navigate";
import {
createMoreInfoUrl,
@@ -12,8 +11,6 @@ import type { MoreInfoDialogParams } from "../dialogs/more-info/ha-more-info-dia
import type { Constructor } from "../types";
import type { HassBaseEl } from "./hass-base-mixin";
const LARGE_MORE_INFO_DOMAINS = ["camera", "image"];
declare global {
// for fire event
interface HASSDomEvents {
@@ -47,13 +44,7 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
{
entityId: ev.detail.entityId,
view,
large:
ev.detail.large ??
(ev.detail.entityId
? LARGE_MORE_INFO_DOMAINS.includes(
computeDomain(ev.detail.entityId)
)
: false),
large: ev.detail.large,
data: ev.detail.data,
returnUrl,
},
+7
View File
@@ -10952,6 +10952,8 @@
"pick_card": "Add to dashboard",
"pick_card_title": "Which card would you like to add to {name}",
"toggle_editor": "Toggle editor",
"enlarge": "Enlarge",
"shrink": "Shrink",
"unsaved_changes": "You have unsaved changes",
"confirm_cancel": "Are you sure you want to cancel?",
"show_visual_editor": "Show visual editor",
@@ -11000,6 +11002,8 @@
"pick_badge": "Which badge would you like to add?",
"pick_badge_title": "Which badge would you like to add to \"{name}\"?",
"toggle_editor": "[%key:ui::panel::lovelace::editor::edit_card::toggle_editor%]",
"enlarge": "[%key:ui::panel::lovelace::editor::edit_card::enlarge%]",
"shrink": "[%key:ui::panel::lovelace::editor::edit_card::shrink%]",
"unsaved_changes": "[%key:ui::panel::lovelace::editor::edit_card::unsaved_changes%]",
"confirm_cancel": "[%key:ui::panel::lovelace::editor::edit_card::confirm_cancel%]",
"show_visual_editor": "[%key:ui::panel::lovelace::editor::edit_card::show_visual_editor%]",
@@ -12450,6 +12454,9 @@
"dropdown": "[%key:ui::panel::lovelace::editor::features::types::climate-preset-modes::style_list::dropdown%]"
}
},
"timer-progress": {
"label": "Timer progress"
},
"fan-preset-modes": {
"label": "Fan preset modes",
"style": "[%key:ui::panel::lovelace::editor::features::types::climate-preset-modes::style%]",
@@ -177,6 +177,7 @@ exports[`generateStatisticsChartData > matches snapshot for a bar chart with sum
"datasets": [
{
"animationDurationUpdate": 0,
"barMaxWidth": 50,
"color": "#4269d07F",
"cursor": "default",
"data": [
@@ -347,6 +348,7 @@ exports[`generateStatisticsChartData > matches snapshot for a bar chart with sum
},
{
"animationDurationUpdate": 0,
"barMaxWidth": 50,
"color": "#f4bd4a7F",
"cursor": "default",
"data": [
@@ -1380,6 +1382,7 @@ exports[`generateStatisticsChartData > matches snapshot for a stacked bar chart
"datasets": [
{
"animationDurationUpdate": 0,
"barMaxWidth": 50,
"color": "#4269d07F",
"cursor": "default",
"data": [
@@ -1444,6 +1447,7 @@ exports[`generateStatisticsChartData > matches snapshot for a stacked bar chart
},
{
"animationDurationUpdate": 0,
"barMaxWidth": 50,
"color": "#f4bd4a7F",
"cursor": "default",
"data": [