Compare commits

..

12 Commits

Author SHA1 Message Date
Petar Petrov
242b5d4e28 clean up 2025-09-25 18:57:22 +03:00
Petar Petrov
e1e44f18d4 ignore yAxisOrigin in sensor card 2025-09-25 18:43:30 +03:00
Petar Petrov
eba729b436 Improve sampling in trend feature and sensor card 2025-09-25 15:20:50 +03:00
renovate[bot]
db2acd4e39 Update dependency @rspack/core to v1.5.6 (#27177)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 13:10:01 +02:00
Wendelin
6dcc52cd44 Reduce default tab padding in tab-group (#27173) 2025-09-25 11:52:04 +01:00
Paul Bottein
981db50826 Smooth animation of the sidebar resizing handle (#27166) 2025-09-25 10:43:04 +02:00
Paul Bottein
09683863a7 Fix safe padding for bottom sheet and add scroll lock (#27165) 2025-09-25 10:41:05 +02:00
Norbert Rittel
8c78f931dc Use "Add (person)" instead of "New person" / "Create" (#27161)
* Update dialog-person-detail.ts

* Update en.json
2025-09-25 10:19:25 +02:00
renovate[bot]
40ce3c1e31 Update dependency lint-staged to v16.2.0 (#27164)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 10:13:06 +02:00
Paulus Schoutsen
e430a1b1be Avoid invalid entities in common controls (#27158) 2025-09-25 08:15:54 +03:00
renovate[bot]
a2c6116417 Update dependency tar to v7.4.4 (#27159)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 08:15:06 +03:00
Paul Bottein
3239273f3e Do not show error message when action has no response in dev tools (#27156) 2025-09-24 19:19:31 +02:00
54 changed files with 436 additions and 763 deletions

View File

@@ -42,7 +42,7 @@ jobs:
- name: Deploy to Netlify
id: deploy
run: |
npx -y netlify-cli@23.7.3 deploy --dir=cast/dist --alias dev
npx -y netlify-cli deploy --dir=cast/dist --alias dev
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_CAST_SITE_ID }}
@@ -77,7 +77,7 @@ jobs:
- name: Deploy to Netlify
id: deploy
run: |
npx -y netlify-cli@23.7.3 deploy --dir=cast/dist --prod
npx -y netlify-cli deploy --dir=cast/dist --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_CAST_SITE_ID }}

View File

@@ -43,7 +43,7 @@ jobs:
- name: Deploy to Netlify
id: deploy
run: |
npx -y netlify-cli@23.7.3 deploy --dir=demo/dist --prod
npx -y netlify-cli deploy --dir=demo/dist --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DEMO_DEV_SITE_ID }}
@@ -78,7 +78,7 @@ jobs:
- name: Deploy to Netlify
id: deploy
run: |
npx -y netlify-cli@23.7.3 deploy --dir=demo/dist --prod
npx -y netlify-cli deploy --dir=demo/dist --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DEMO_SITE_ID }}

View File

@@ -35,7 +35,7 @@ jobs:
- name: Deploy to Netlify
id: deploy
run: |
npx -y netlify-cli@23.7.3 deploy --dir=gallery/dist --prod
npx -y netlify-cli deploy --dir=gallery/dist --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_GALLERY_SITE_ID }}

View File

@@ -40,7 +40,7 @@ jobs:
- name: Deploy preview to Netlify
id: deploy
run: |
npx -y netlify-cli@23.7.3 deploy --dir=gallery/dist --alias "deploy-preview-${{ github.event.number }}" \
npx -y netlify-cli deploy --dir=gallery/dist --alias "deploy-preview-${{ github.event.number }}" \
--json > deploy_output.json
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

View File

@@ -5,17 +5,17 @@ const castContext = framework.CastReceiverContext.getInstance();
const playerManager = castContext.getPlayerManager();
playerManager.setMessageInterceptor(
framework.messages.MessageType.LOAD,
"LOAD" as framework.messages.MessageType.LOAD,
(loadRequestData) => {
const media = loadRequestData.media;
// Special handling if it came from Google Assistant
if (media.entity) {
media.contentId = media.entity;
media.streamType = framework.messages.StreamType.LIVE;
media.streamType = "LIVE" as framework.messages.StreamType.LIVE;
media.contentType = "application/vnd.apple.mpegurl";
// @ts-ignore
media.hlsVideoSegmentFormat =
framework.messages.HlsVideoSegmentFormat.FMP4;
"fmp4" as framework.messages.HlsVideoSegmentFormat.FMP4;
}
return loadRequestData;
}

View File

@@ -40,7 +40,8 @@ const playDummyMedia = (viewTitle?: string) => {
loadRequestData.media.contentId =
"https://cast.home-assistant.io/images/google-nest-hub.png";
loadRequestData.media.contentType = "image/jpeg";
loadRequestData.media.streamType = framework.messages.StreamType.NONE;
loadRequestData.media.streamType =
"NONE" as framework.messages.StreamType.NONE;
const metadata = new framework.messages.GenericMediaMetadata();
metadata.title = viewTitle;
loadRequestData.media.metadata = metadata;
@@ -89,7 +90,7 @@ const showMediaPlayer = () => {
const options = new framework.CastReceiverOptions();
options.disableIdleTimeout = true;
options.customNamespaces = {
[CAST_NS]: framework.system.MessageType.JSON,
[CAST_NS]: "json" as framework.system.MessageType.JSON,
};
castContext.addCustomMessageListener(
@@ -97,9 +98,7 @@ castContext.addCustomMessageListener(
// @ts-ignore
(ev: ReceivedMessage<HassMessage>) => {
// We received a show Lovelace command, stop media from playing, hide media player and show Lovelace controller
if (
playerManager.getPlayerState() !== framework.messages.PlayerState.IDLE
) {
if (playerManager.getPlayerState() !== "IDLE") {
playerManager.stop();
} else {
showLovelaceController();
@@ -113,7 +112,7 @@ castContext.addCustomMessageListener(
const playerManager = castContext.getPlayerManager();
playerManager.setMessageInterceptor(
framework.messages.MessageType.LOAD,
"LOAD" as framework.messages.MessageType.LOAD,
(loadRequestData) => {
if (
loadRequestData.media.contentId ===
@@ -127,24 +126,23 @@ playerManager.setMessageInterceptor(
// Special handling if it came from Google Assistant
if (media.entity) {
media.contentId = media.entity;
media.streamType = framework.messages.StreamType.LIVE;
media.streamType = "LIVE" as framework.messages.StreamType.LIVE;
media.contentType = "application/vnd.apple.mpegurl";
// @ts-ignore
media.hlsVideoSegmentFormat =
framework.messages.HlsVideoSegmentFormat.FMP4;
"fmp4" as framework.messages.HlsVideoSegmentFormat.FMP4;
}
return loadRequestData;
}
);
playerManager.addEventListener(
framework.events.EventType.MEDIA_STATUS,
"MEDIA_STATUS" as framework.events.EventType.MEDIA_STATUS,
(event) => {
if (
event.mediaStatus?.playerState === framework.messages.PlayerState.IDLE &&
event.mediaStatus?.playerState === "IDLE" &&
event.mediaStatus?.idleReason &&
event.mediaStatus?.idleReason !==
framework.messages.IdleReason.INTERRUPTED
event.mediaStatus?.idleReason !== "INTERRUPTED"
) {
// media finished or stopped, return to default Lovelace
showLovelaceController();

View File

@@ -34,5 +34,3 @@ Check the [webawesome documentation](https://webawesome.com/docs/components/slid
**CSS Custom Properties**
- `--ha-slider-track-size` - Height of the slider track. Defaults to `4px`.
- `--ha-slider-thumb-color` - Color of the slider thumb. Defaults to `var(--primary-color)`.
- `--ha-slider-indicator-color` - Color of the filled portion of the slider track. Defaults to `var(--primary-color)`.

View File

@@ -52,7 +52,7 @@
"@fullcalendar/list": "6.1.19",
"@fullcalendar/luxon3": "6.1.19",
"@fullcalendar/timegrid": "6.1.19",
"@home-assistant/webawesome": "3.0.0-beta.6.ha.4",
"@home-assistant/webawesome": "3.0.0-beta.4.ha.3",
"@lezer/highlight": "1.2.1",
"@lit-labs/motion": "1.0.9",
"@lit-labs/observers": "2.0.6",
@@ -158,10 +158,10 @@
"@octokit/plugin-retry": "8.0.1",
"@octokit/rest": "22.0.0",
"@rsdoctor/rspack-plugin": "1.2.3",
"@rspack/core": "1.5.5",
"@rspack/core": "1.5.6",
"@rspack/dev-server": "1.1.4",
"@types/babel__plugin-transform-runtime": "7.9.5",
"@types/chromecast-caf-receiver": "6.0.22",
"@types/chromecast-caf-receiver": "6.0.24",
"@types/chromecast-caf-sender": "1.0.11",
"@types/color-name": "2.0.0",
"@types/culori": "4.0.1",
@@ -203,7 +203,7 @@
"husky": "9.1.7",
"jsdom": "27.0.0",
"jszip": "3.10.1",
"lint-staged": "16.1.6",
"lint-staged": "16.2.0",
"lit-analyzer": "2.0.3",
"lodash.merge": "4.6.2",
"lodash.template": "4.5.0",
@@ -213,7 +213,7 @@
"rspack-manifest-plugin": "5.1.0",
"serve": "14.2.5",
"sinon": "21.0.0",
"tar": "7.4.3",
"tar": "7.4.4",
"terser-webpack-plugin": "5.3.14",
"ts-lit-plugin": "2.0.2",
"typescript": "5.9.2",

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "home-assistant-frontend"
version = "20251001.4"
version = "20250924.0"
license = "Apache-2.0"
license-files = ["LICENSE*"]
description = "The Home Assistant frontend"

View File

@@ -1,8 +0,0 @@
import xss from "xss";
export const filterXSS = (html: string) =>
xss(html, {
whiteList: {},
stripIgnoreTag: true,
stripIgnoreTagBody: true,
});

View File

@@ -1,21 +1,22 @@
import type { LineSeriesOption } from "echarts";
export function downSampleLineData(
data: LineSeriesOption["data"],
chartWidth: number,
export function downSampleLineData<
T extends [number, number] | NonNullable<LineSeriesOption["data"]>[number],
>(
data: T[] | undefined,
maxDetails: number,
minX?: number,
maxX?: number
) {
if (!data || data.length < 10) {
return data;
): T[] {
if (!data) {
return [];
}
const width = chartWidth * window.devicePixelRatio;
if (data.length <= width) {
if (data.length <= maxDetails) {
return data;
}
const min = minX ?? getPointData(data[0]!)[0];
const max = maxX ?? getPointData(data[data.length - 1]!)[0];
const step = Math.floor((max - min) / width);
const step = Math.ceil((max - min) / Math.floor(maxDetails));
const frames = new Map<
number,
{
@@ -47,7 +48,7 @@ export function downSampleLineData(
}
// Convert frames back to points
const result: typeof data = [];
const result: T[] = [];
for (const [_i, frame] of frames) {
// Use min/max points to preserve visual accuracy
// The order of the data must be preserved so max may be before min

View File

@@ -25,7 +25,6 @@ import type { ECOption } from "../../resources/echarts";
import type { HomeAssistant } from "../../types";
import { isMac } from "../../util/is_mac";
import "../ha-icon-button";
import { filterXSS } from "../../common/util/xss";
import { formatTimeLabel } from "./axis-label";
import { ensureArray } from "../../common/array/ensure-array";
import "../chips/ha-assist-chip";
@@ -805,15 +804,14 @@ export class HaChartBase extends LitElement {
sampling: undefined,
data: downSampleLineData(
data as LineSeriesOption["data"],
this.clientWidth,
this.clientWidth * window.devicePixelRatio,
minX,
maxX
),
};
}
}
const name = filterXSS(String(s.name ?? s.id ?? ""));
return { ...s, name, data };
return { ...s, data };
});
return series as ECOption["series"];
}

View File

@@ -9,7 +9,6 @@ import { ResizeController } from "@lit-labs/observers/resize-controller";
import type { HomeAssistant } from "../../types";
import type { ECOption } from "../../resources/echarts";
import { measureTextWidth } from "../../util/text";
import { filterXSS } from "../../common/util/xss";
import "./ha-chart-base";
import { NODE_SIZE } from "../trace/hat-graph-const";
import "../ha-alert";
@@ -93,12 +92,12 @@ export class HaSankeyChart extends LitElement {
: data.value;
if (data.id) {
const node = this.data.nodes.find((n) => n.id === data.id);
return `${params.marker} ${filterXSS(node?.label ?? data.id)}<br>${value}`;
return `${params.marker} ${node?.label ?? data.id}<br>${value}`;
}
if (data.source && data.target) {
const source = this.data.nodes.find((n) => n.id === data.source);
const target = this.data.nodes.find((n) => n.id === data.target);
return `${filterXSS(source?.label ?? data.source)}${filterXSS(target?.label ?? data.target)}<br>${value}`;
return `${source?.label ?? data.source}${target?.label ?? data.target}<br>${value}`;
}
return null;
};

View File

@@ -1,5 +1,5 @@
import type { CSSResultGroup, TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import { fireEvent } from "../common/dom/fire_event";
import type { LocalizeFunc } from "../common/translations/localize";
@@ -73,18 +73,14 @@ export class HaAnalytics extends LitElement {
.checked=${this.analytics?.preferences[preference]}
.preference=${preference}
name=${preference}
?disabled=${baseEnabled}
>
</ha-switch>
${baseEnabled
? nothing
: html`<ha-tooltip
.for="switch-${preference}"
placement="right"
>
${this.localize(
`ui.panel.${this.translationKeyPanel}.analytics.need_base_enabled`
)}
</ha-tooltip>`}
<ha-tooltip .for="switch-${preference}" placement="right">
${this.localize(
`ui.panel.${this.translationKeyPanel}.analytics.need_base_enabled`
)}
</ha-tooltip>
</span>
</ha-settings-row>
`

View File

@@ -42,8 +42,8 @@ export class HaBottomSheet extends LitElement {
static styles = css`
wa-drawer {
--wa-color-surface-raised: var(
--ha-bottom-sheet-surface-background,
var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
--ha-dialog-surface-background,
var(--mdc-theme-surface, #fff)
);
--spacing: 0;
--size: auto;
@@ -51,14 +51,8 @@ export class HaBottomSheet extends LitElement {
--hide-duration: ${BOTTOM_SHEET_ANIMATION_DURATION_MS}ms;
}
wa-drawer::part(dialog) {
border-top-left-radius: var(
--ha-bottom-sheet-border-radius,
var(--ha-dialog-border-radius, var(--ha-border-radius-2xl))
);
border-top-right-radius: var(
--ha-bottom-sheet-border-radius,
var(--ha-dialog-border-radius, var(--ha-border-radius-2xl))
);
border-top-left-radius: var(--ha-border-radius-lg);
border-top-right-radius: var(--ha-border-radius-lg);
max-height: 90vh;
padding-bottom: var(--safe-area-inset-bottom);
padding-left: var(--safe-area-inset-left);

View File

@@ -41,7 +41,8 @@ export class HaButton extends Button {
return [
Button.styles,
css`
:host {
.button {
/* set theme vars */
--wa-form-control-padding-inline: 16px;
--wa-font-weight-action: var(--ha-font-weight-medium);
--wa-form-control-border-radius: var(
@@ -53,8 +54,7 @@ export class HaButton extends Button {
--ha-button-height,
var(--button-height, 40px)
);
}
.button {
font-size: var(--ha-font-size-m);
line-height: 1;

View File

@@ -121,7 +121,7 @@ export class HaDialog extends DialogBase {
position: var(--dialog-surface-position, relative);
top: var(--dialog-surface-top);
margin-top: var(--dialog-surface-margin-top);
min-width: var(--mdc-dialog-min-width, auto);
min-width: var(--mdc-dialog-min-width, 100vw);
min-height: var(--mdc-dialog-min-height, auto);
border-radius: var(--ha-dialog-border-radius, 24px);
-webkit-backdrop-filter: var(--ha-dialog-surface-backdrop-filter, none);
@@ -130,13 +130,23 @@ export class HaDialog extends DialogBase {
--ha-dialog-surface-background,
var(--mdc-theme-surface, #fff)
);
padding: var(--dialog-surface-padding);
}
:host([flexContent]) .mdc-dialog .mdc-dialog__content {
display: flex;
flex-direction: column;
}
@media all and (max-width: 450px), all and (max-height: 500px) {
.mdc-dialog .mdc-dialog__surface {
min-height: 100vh;
max-height: 100vh;
padding-top: var(--safe-area-inset-top);
padding-bottom: var(--safe-area-inset-bottom);
padding-left: var(--safe-area-inset-left);
padding-right: var(--safe-area-inset-right);
}
}
.header_title {
display: flex;
align-items: center;

View File

@@ -1,5 +1,6 @@
import { css, html, LitElement } from "lit";
import { customElement, query, state } from "lit/decorators";
import { styleMap } from "lit/directives/style-map";
import { fireEvent } from "../common/dom/fire_event";
import { BOTTOM_SHEET_ANIMATION_DURATION_MS } from "./ha-bottom-sheet";
@@ -36,14 +37,13 @@ export class HaResizableBottomSheet extends LitElement {
return html`<dialog
open
@transitionend=${this._handleTransitionEnd}
style=${`
--height: ${this._dialogViewportHeight}vh;
--height: ${this._dialogViewportHeight}dvh;
--max-height: ${this._dialogMaxViewpointHeight}vh;
--max-height: ${this._dialogMaxViewpointHeight}dvh;
--min-height: ${this._dialogMinViewpointHeight}vh;
--min-height: ${this._dialogMinViewpointHeight}dvh;
`}
style=${styleMap({
height: this._dialogViewportHeight
? `${this._dialogViewportHeight}vh`
: "auto",
maxHeight: `${this._dialogMaxViewpointHeight}vh`,
minHeight: `${this._dialogMinViewpointHeight}vh`,
})}
>
<div class="handle-wrapper">
<div
@@ -213,14 +213,12 @@ export class HaResizableBottomSheet extends LitElement {
cursor: grabbing;
}
dialog {
height: var(--height, auto);
max-height: var(--max-height, 70vh);
max-height: var(--max-height, 70dvh);
min-height: var(--min-height, 30vh);
min-height: var(--min-height, 30dvh);
height: auto;
max-height: 70vh;
min-height: 30vh;
background-color: var(
--ha-bottom-sheet-surface-background,
var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
--ha-dialog-surface-background,
var(--mdc-theme-surface, #fff)
);
display: flex;
flex-direction: column;
@@ -241,12 +239,12 @@ export class HaResizableBottomSheet extends LitElement {
inset-inline-start: 0;
box-shadow: 0px -8px 16px rgba(0, 0, 0, 0.2);
border-top-left-radius: var(
--ha-bottom-sheet-border-radius,
var(--ha-dialog-border-radius, var(--ha-border-radius-2xl))
--ha-dialog-border-radius,
var(--ha-border-radius-2xl)
);
border-top-right-radius: var(
--ha-bottom-sheet-border-radius,
var(--ha-dialog-border-radius, var(--ha-border-radius-2xl))
--ha-dialog-border-radius,
var(--ha-border-radius-2xl)
);
transform: translateY(100%);
transition: transform ${BOTTOM_SHEET_ANIMATION_DURATION_MS}ms ease;
@@ -256,6 +254,7 @@ export class HaResizableBottomSheet extends LitElement {
border-bottom-width: 0;
border-style: var(--ha-bottom-sheet-border-style);
border-color: var(--ha-bottom-sheet-border-color);
margin-bottom: var(--safe-area-inset-bottom);
margin-left: var(--safe-area-inset-left);
margin-right: var(--safe-area-inset-right);
}

View File

@@ -39,24 +39,22 @@ class HaSegmentedBar extends LitElement {
<slot name="extra"></slot>
</div>
<div class="bar">
${this.segments.map(
(segment, index) => html`
${this.hideTooltip || !segment.label
? nothing
: html`
<ha-tooltip for="segment-${index}" placement="top">
${segment.label}
</ha-tooltip>
`}
<div
id="segment-${index}"
style=${styleMap({
width: `${(segment.value / totalValue) * 100}%`,
backgroundColor: segment.color,
})}
></div>
`
)}
${this.segments.map((segment) => {
const bar = html`<div
style=${styleMap({
width: `${(segment.value / totalValue) * 100}%`,
backgroundColor: segment.color,
})}
></div>`;
return this.hideTooltip && !segment.label
? bar
: html`
<ha-tooltip>
<span slot="content">${segment.label}</span>
${bar}
</ha-tooltip>
`;
})}
</div>
${this.hideLegend
? nothing

View File

@@ -82,12 +82,12 @@ export class HaNumberSelector extends LitElement {
labeled
.min=${this.selector.number!.min}
.max=${this.selector.number!.max}
.value=${this.value}
.value=${this.value ?? ""}
.step=${sliderStep}
.disabled=${this.disabled}
.required=${this.required}
@change=${this._handleSliderChange}
.withMarkers=${this.selector.number?.slider_ticks || false}
.ticks=${this.selector.number?.slider_ticks}
>
</ha-slider>
`

View File

@@ -19,6 +19,7 @@ export class HaSlider extends Slider {
Slider.styles,
css`
:host {
--wa-form-control-activated-color: var(--primary-color);
--track-size: var(--ha-slider-track-size, 4px);
--marker-height: calc(var(--ha-slider-track-size, 4px) / 2);
--marker-width: calc(var(--ha-slider-track-size, 4px) / 2);
@@ -53,7 +54,6 @@ export class HaSlider extends Slider {
#thumb {
border: none;
background-color: var(--ha-slider-thumb-color, var(--primary-color));
}
#slider:focus-visible:not(.disabled) #thumb,
@@ -62,21 +62,14 @@ export class HaSlider extends Slider {
outline: var(--wa-focus-ring);
}
#indicator {
background-color: var(
--ha-slider-indicator-color,
var(--primary-color)
);
}
:host([size="medium"]) {
--thumb-width: 20px;
--thumb-height: 20px;
--thumb-width: var(--ha-font-size-l, 1.25em);
--thumb-height: var(--ha-font-size-l, 1.25em);
}
:host([size="small"]) {
--thumb-width: 16px;
--thumb-height: 16px;
--thumb-width: var(--ha-font-size-m, 1em);
--thumb-height: var(--ha-font-size-m, 1em);
}
`,
];

View File

@@ -17,7 +17,7 @@ export class HaTooltip extends Tooltip {
css`
:host {
--wa-tooltip-background-color: var(--secondary-background-color);
--wa-tooltip-content-color: var(--primary-text-color);
--wa-tooltip-color: var(--primary-text-color);
--wa-tooltip-font-family: var(
--ha-tooltip-font-family,
var(--ha-font-family-body)

View File

@@ -12,7 +12,6 @@ export const DISCOVERY_SOURCES = [
"bluetooth",
"dhcp",
"discovery",
"esphome",
"hardware",
"hassio",
"homekit",

View File

@@ -4,7 +4,6 @@ export interface LovelaceBadgeConfig {
type: string;
[key: string]: any;
visibility?: Condition[];
disabled?: boolean;
}
export const ensureBadgeConfig = (

View File

@@ -26,21 +26,20 @@ class StepFlowLoading extends LitElement {
this.step
);
return html`
<div class="content">
<ha-spinner size="large"></ha-spinner>
<div class="init-spinner">
${description ? html`<div>${description}</div>` : ""}
<ha-spinner></ha-spinner>
</div>
`;
}
static styles = css`
.content {
margin-top: 0;
.init-spinner {
padding: 50px 100px;
text-align: center;
}
ha-spinner {
margin-bottom: 16px;
margin-top: 16px;
}
`;
}

View File

@@ -34,7 +34,7 @@ class StepFlowProgress extends LitElement {
)}%</ha-progress-ring
>
`
: html`<ha-spinner size="large"></ha-spinner>`}
: html` <ha-spinner size="large"></ha-spinner> `}
${this.flowConfig.renderShowFormProgressDescription(
this.hass,
this.step
@@ -48,7 +48,6 @@ class StepFlowProgress extends LitElement {
configFlowContentStyles,
css`
.content {
margin-top: 0;
padding: 50px 100px;
text-align: center;
}

View File

@@ -9,9 +9,8 @@ import {
mdiVolumeOff,
mdiVolumePlus,
} from "@mdi/js";
import type { PropertyValues } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, query } from "lit/decorators";
import { customElement, property } from "lit/decorators";
import { ifDefined } from "lit/directives/if-defined";
import { classMap } from "lit/directives/class-map";
import { stateActive } from "../../../common/entity/state_active";
@@ -20,7 +19,7 @@ import { formatDurationDigital } from "../../../common/datetime/format_duration"
import "../../../components/ha-icon-button";
import "../../../components/ha-list-item";
import "../../../components/ha-select";
import type { HaSlider } from "../../../components/ha-slider";
import "../../../components/ha-slider";
import "../../../components/ha-button";
import "../../../components/ha-svg-icon";
import { showMediaBrowserDialog } from "../../../components/media-player/show-media-browser-dialog";
@@ -31,8 +30,6 @@ import type {
MediaPlayerEntity,
} from "../../../data/media-player";
import {
cleanupMediaTitle,
computeMediaDescription,
computeMediaControls,
handleMediaControlClick,
MediaPlayerEntityFeature,
@@ -51,20 +48,10 @@ class MoreInfoMediaPlayer extends LitElement {
@property({ attribute: false }) public stateObj?: MediaPlayerEntity;
@query("#position-slider")
private _positionSlider?: HaSlider;
protected firstUpdated(_changedProperties: PropertyValues) {
if (this._positionSlider) {
this._positionSlider.valueFormatter = (value: number) =>
this._formatDuration(value);
}
}
private _formatDuration(duration: number) {
private _formateDuration(duration: number) {
const hours = Math.floor(duration / 3600);
const minutes = Math.floor((duration % 3600) / 60);
const seconds = Math.floor(duration % 60);
const seconds = duration % 60;
return formatDurationDigital(this.hass.locale, {
hours,
minutes,
@@ -271,19 +258,16 @@ class MoreInfoMediaPlayer extends LitElement {
const stateObj = this.stateObj;
const controls = computeMediaControls(stateObj, true);
const coverUrl =
stateObj.attributes.entity_picture_local ||
stateObj.attributes.entity_picture ||
"";
const coverUrl = stateObj.attributes.entity_picture || "";
const playerObj = new HassMediaPlayerEntity(this.hass, this.stateObj);
const position = Math.max(Math.floor(playerObj.currentProgress || 0), 0);
const duration = Math.max(stateObj.attributes.media_duration || 0, 0);
const remaining = Math.max(duration - position, 0);
const remainingFormatted = this._formatDuration(remaining);
const positionFormatted = this._formatDuration(position);
const primaryTitle = cleanupMediaTitle(stateObj.attributes.media_title);
const secondaryTitle = computeMediaDescription(stateObj);
const position = Math.floor(playerObj.currentProgress) || 0;
const duration = stateObj.attributes.media_duration || 0;
const remaining = duration - position;
const durationFormated =
remaining > 0 ? this._formateDuration(remaining) : 0;
const postionFormated = this._formateDuration(position);
const primaryTitle = playerObj.primaryTitle;
const secondaryTitle = playerObj.secondaryTitle;
const turnOn = controls?.find((c) => c.action === "turn_on");
const turnOff = controls?.find((c) => c.action === "turn_off");
@@ -329,7 +313,6 @@ class MoreInfoMediaPlayer extends LitElement {
? html`
<div class="position-bar">
<ha-slider
id="position-slider"
min="0"
max=${duration}
step="1"
@@ -340,10 +323,11 @@ class MoreInfoMediaPlayer extends LitElement {
@change=${this._handleMediaSeekChanged}
?disabled=${!stateActive(stateObj) ||
!supportsFeature(stateObj, MediaPlayerEntityFeature.SEEK)}
>
<span slot="reference">${positionFormatted}</span>
<span slot="reference">${remainingFormatted}</span>
</ha-slider>
></ha-slider>
<div class="position-info-row">
<span class="position-time">${postionFormated}</span>
<span class="duration-time">${durationFormated}</span>
</div>
</div>
`
: nothing}
@@ -364,31 +348,28 @@ class MoreInfoMediaPlayer extends LitElement {
</ha-icon-button>`
: html`<span class="spacer"></span>`;
})}
${[
"media_play_pause",
"media_pause",
"media_play",
"media_stop",
].map((action) => {
const control = controls?.find((c) => c.action === action);
return control
? html`<ha-button
variant="brand"
appearance="filled"
size="medium"
action=${action}
@click=${this._handleClick}
class="center-control"
>
<ha-svg-icon
.path=${control.icon}
aria-label=${this.hass.localize(
`ui.card.media_player.${control.action}`
)}
></ha-svg-icon>
</ha-button>`
: nothing;
})}
${["media_play_pause", "media_pause", "media_play"].map(
(action) => {
const control = controls?.find((c) => c.action === action);
return control
? html`<ha-button
variant="brand"
appearance="filled"
size="medium"
action=${action}
@click=${this._handleClick}
class="center-control"
>
<ha-svg-icon
.path=${control.icon}
aria-label=${this.hass.localize(
`ui.card.media_player.${control.action}`
)}
></ha-svg-icon>
</ha-button>`
: nothing;
}
)}
${["media_next_track", "shuffle_set"].map((action) => {
const control = controls?.find((c) => c.action === action);
return control
@@ -496,22 +477,6 @@ class MoreInfoMediaPlayer extends LitElement {
height: 320px;
}
@media (max-height: 750px) {
.cover-container {
height: 120px;
}
.cover-image {
width: 100px;
height: 100px;
}
.cover-image--playing {
width: 120px;
height: 120px;
}
}
.empty-cover {
background-color: var(--secondary-background-color);
font-size: 1.5em;
@@ -583,8 +548,13 @@ class MoreInfoMediaPlayer extends LitElement {
flex-direction: column;
}
.position-bar ha-slider::part(references) {
.position-info-row {
display: flex;
flex-direction: row;
justify-content: space-between;
color: var(--secondary-text-color);
padding: 0 8px;
font-size: var(--ha-font-size-s);
}
.media-info-row {

View File

@@ -8,7 +8,6 @@ import { createCloseHeading } from "../../components/ha-dialog";
import "../../components/ha-textarea";
import type { HaTextArea } from "../../components/ha-textarea";
import { convertTextToSpeech } from "../../data/tts";
import { haStyleDialog } from "../../resources/styles";
import type { HomeAssistant } from "../../types";
import { showAlertDialog } from "../generic/show-dialog-box";
import type { TTSTryDialogParams } from "./show-dialog-tts-try";
@@ -150,24 +149,21 @@ export class TTSTryDialog extends LitElement {
});
}
static styles = [
haStyleDialog,
css`
ha-dialog {
--mdc-dialog-max-width: 500px;
}
ha-textarea,
ha-select {
width: 100%;
}
ha-select {
margin-top: 8px;
}
.loading {
height: 36px;
}
`,
];
static styles = css`
ha-dialog {
--mdc-dialog-max-width: 500px;
}
ha-textarea,
ha-select {
width: 100%;
}
ha-select {
margin-top: 8px;
}
.loading {
height: 36px;
}
`;
}
declare global {

View File

@@ -5,8 +5,8 @@ import { restoreScroll } from "../common/decorators/restore-scroll";
import { goBack } from "../common/navigate";
import "../components/ha-icon-button-arrow-prev";
import "../components/ha-menu-button";
import { haStyleScrollbar } from "../resources/styles";
import type { HomeAssistant } from "../types";
import { haStyleScrollbar } from "../resources/styles";
@customElement("hass-subpage")
class HassSubpage extends LitElement {
@@ -154,15 +154,9 @@ class HassSubpage extends LitElement {
1px - var(--header-height, 0px) - var(
--safe-area-inset-top,
0px
) - var(
--hass-subpage-bottom-inset,
var(--safe-area-inset-bottom, 0px)
)
);
margin-bottom: var(
--hass-subpage-bottom-inset,
var(--safe-area-inset-bottom)
) - var(--safe-area-inset-bottom, 0px)
);
margin-bottom: var(--safe-area-inset-bottom);
margin-right: var(--safe-area-inset-right);
overflow-y: auto;
overflow: auto;

View File

@@ -12,11 +12,11 @@ export const KeyboardShortcutMixin = <T extends Constructor<LitElement>>(
class extends superClass {
private _keydownEvent = (event: KeyboardEvent) => {
const supportedShortcuts = this.supportedShortcuts();
const key = event.shiftKey ? event.key.toUpperCase() : event.key;
if (
(event.ctrlKey || event.metaKey) &&
!event.shiftKey &&
!event.altKey &&
key in supportedShortcuts
event.key in supportedShortcuts
) {
// Only capture the event if the user is not focused on an input
if (!canOverrideAlphanumericInput(event.composedPath())) {
@@ -27,14 +27,14 @@ export const KeyboardShortcutMixin = <T extends Constructor<LitElement>>(
return;
}
event.preventDefault();
supportedShortcuts[key]();
supportedShortcuts[event.key]();
return;
}
const supportedSingleKeyShortcuts = this.supportedSingleKeyShortcuts();
if (key in supportedSingleKeyShortcuts) {
if (event.key in supportedSingleKeyShortcuts) {
event.preventDefault();
supportedSingleKeyShortcuts[key]();
supportedSingleKeyShortcuts[event.key]();
}
};

View File

@@ -1,6 +1,5 @@
import { consume } from "@lit/context";
import {
mdiAppleKeyboardCommand,
mdiCog,
mdiContentSave,
mdiDebugStepOver,
@@ -74,10 +73,8 @@ import { showMoreInfoDialog } from "../../../dialogs/more-info/show-ha-more-info
import "../../../layouts/hass-subpage";
import { KeyboardShortcutMixin } from "../../../mixins/keyboard-shortcut-mixin";
import { PreventUnsavedMixin } from "../../../mixins/prevent-unsaved-mixin";
import { UndoRedoMixin } from "../../../mixins/undo-redo-mixin";
import { haStyle } from "../../../resources/styles";
import type { Entries, HomeAssistant, Route } from "../../../types";
import { isMac } from "../../../util/is_mac";
import { showToast } from "../../../util/toast";
import { showAssignCategoryDialog } from "../category/show-dialog-assign-category";
import "../ha-config-section";
@@ -89,6 +86,7 @@ import {
import "./blueprint-automation-editor";
import "./manual-automation-editor";
import type { HaManualAutomationEditor } from "./manual-automation-editor";
import { UndoRedoMixin } from "../../../mixins/undo-redo-mixin";
declare global {
interface HTMLElementTagNameMap {
@@ -217,10 +215,6 @@ export class HaAutomationEditor extends UndoRedoMixin<
: undefined;
const useBlueprint = "use_blueprint" in this._config;
const shortcutIcon = isMac
? html`<ha-svg-icon .path=${mdiAppleKeyboardCommand}></ha-svg-icon>`
: this.hass.localize("ui.panel.config.automation.editor.ctrl");
return html`
<hass-subpage
.hass=${this.hass}
@@ -237,42 +231,16 @@ export class HaAutomationEditor extends UndoRedoMixin<
.path=${mdiUndo}
@click=${this.undo}
.disabled=${!this.canUndo}
id="button-undo"
>
</ha-icon-button>
<ha-tooltip placement="bottom" for="button-undo">
${this.hass.localize("ui.common.undo")}
<span class="shortcut"
>(
<span>${shortcutIcon}</span>
<span>+</span>
<span>Z</span>)
</span>
</ha-tooltip>
<ha-icon-button
slot="toolbar-icon"
.label=${this.hass.localize("ui.common.redo")}
.path=${mdiRedo}
@click=${this.redo}
.disabled=${!this.canRedo}
id="button-redo"
>
</ha-icon-button>
<ha-tooltip placement="bottom" for="button-redo">
${this.hass.localize("ui.common.redo")}
<span class="shortcut">
(
${isMac
? html`<span>${shortcutIcon}</span>
<span>+</span>
<span>Shift</span>
<span>+</span>
<span>Z</span>`
: html`<span>${shortcutIcon}</span>
<span>+</span>
<span>Y</span>`})
</span>
</ha-tooltip>`
</ha-icon-button>`
: nothing}
${this._config?.id && !this.narrow
? html`
@@ -1203,7 +1171,6 @@ export class HaAutomationEditor extends UndoRedoMixin<
Delete: () => this._deleteSelectedRow(),
Backspace: () => this._deleteSelectedRow(),
z: () => this.undo(),
Z: () => this.redo(),
y: () => this.redo(),
};
}
@@ -1257,7 +1224,6 @@ export class HaAutomationEditor extends UndoRedoMixin<
--ha-automation-editor-width,
1540px
);
--hass-subpage-bottom-inset: 0px;
}
ha-fade-in {
display: flex;
@@ -1326,15 +1292,6 @@ export class HaAutomationEditor extends UndoRedoMixin<
ha-fab.dirty {
bottom: calc(16px + var(--safe-area-inset-bottom, 0px));
}
ha-tooltip ha-svg-icon {
width: 12px;
}
ha-tooltip .shortcut {
display: inline-flex;
flex-direction: row;
align-items: center;
gap: 2px;
}
`,
];
}

View File

@@ -292,7 +292,9 @@ export default class HaAutomationSidebar extends LitElement {
:host {
z-index: 6;
outline: none;
height: calc(100% - var(--safe-area-inset-top, 0px));
height: calc(
100% - var(--safe-area-inset-top) - var(--safe-area-inset-bottom)
);
--ha-card-border-radius: var(
--ha-dialog-border-radius,
var(--ha-border-radius-2xl)
@@ -302,6 +304,7 @@ export default class HaAutomationSidebar extends LitElement {
--ha-bottom-sheet-border-style: solid;
--ha-bottom-sheet-border-color: var(--primary-color);
margin-top: var(--safe-area-inset-top);
margin-bottom: var(--safe-area-inset-bottom);
}
@media all and (max-width: 870px) {

View File

@@ -145,19 +145,24 @@ export const manualEditorStyles = css`
.content {
padding-top: 24px;
padding-bottom: max(var(--safe-area-inset-bottom), 32px);
padding-bottom: 72px;
transition: padding-bottom 180ms ease-in-out;
}
.content.has-bottom-sheet {
padding-bottom: calc(90vh - max(var(--safe-area-inset-bottom), 32px));
padding-bottom: calc(90vh - 72px);
}
ha-automation-sidebar {
position: fixed;
top: calc(var(--header-height) + 16px);
height: calc(-81px + 100vh - var(--safe-area-inset-top, 0px));
height: calc(-81px + 100dvh - var(--safe-area-inset-top, 0px));
height: calc(
-81px +
100dvh - var(--safe-area-inset-top, 0px) - var(
--safe-area-inset-bottom,
0px
)
);
width: var(--sidebar-width);
display: block;
}

View File

@@ -213,7 +213,6 @@ class HaConfigEnergy extends LitElement {
this.hass.states[key],
])
),
issues: this._validationResult,
};
const json = JSON.stringify(data, null, 2);
const blob = new Blob([json], { type: "application/json" });

View File

@@ -1,6 +1,5 @@
import { consume } from "@lit/context";
import {
mdiAppleKeyboardCommand,
mdiCog,
mdiContentSave,
mdiDebugStepOver,
@@ -65,10 +64,8 @@ import "../../../layouts/hass-subpage";
import { KeyboardShortcutMixin } from "../../../mixins/keyboard-shortcut-mixin";
import { PreventUnsavedMixin } from "../../../mixins/prevent-unsaved-mixin";
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
import { UndoRedoMixin } from "../../../mixins/undo-redo-mixin";
import { haStyle } from "../../../resources/styles";
import type { Entries, HomeAssistant, Route } from "../../../types";
import { isMac } from "../../../util/is_mac";
import { showToast } from "../../../util/toast";
import { showAutomationModeDialog } from "../automation/automation-mode-dialog/show-dialog-automation-mode";
import type { EntityRegistryUpdate } from "../automation/automation-save-dialog/show-dialog-automation-save";
@@ -77,6 +74,7 @@ import { showAssignCategoryDialog } from "../category/show-dialog-assign-categor
import "./blueprint-script-editor";
import "./manual-script-editor";
import type { HaManualScriptEditor } from "./manual-script-editor";
import { UndoRedoMixin } from "../../../mixins/undo-redo-mixin";
const baseEditorMixins = SubscribeMixin(
PreventUnsavedMixin(KeyboardShortcutMixin(LitElement))
@@ -170,10 +168,6 @@ export class HaScriptEditor extends UndoRedoMixin<
: undefined;
const useBlueprint = "use_blueprint" in this._config;
const shortcutIcon = isMac
? html`<ha-svg-icon .path=${mdiAppleKeyboardCommand}></ha-svg-icon>`
: this.hass.localize("ui.panel.config.automation.editor.ctrl");
return html`
<hass-subpage
.hass=${this.hass}
@@ -190,41 +184,16 @@ export class HaScriptEditor extends UndoRedoMixin<
.path=${mdiUndo}
@click=${this.undo}
.disabled=${!this.canUndo}
id="button-undo"
>
</ha-icon-button>
<ha-tooltip placement="bottom" for="button-undo">
${this.hass.localize("ui.common.undo")}
<span class="shortcut">
(<span>${shortcutIcon}</span>
<span>+</span>
<span>Z</span>)
</span>
</ha-tooltip>
<ha-icon-button
slot="toolbar-icon"
.label=${this.hass.localize("ui.common.redo")}
.path=${mdiRedo}
@click=${this.redo}
.disabled=${!this.canRedo}
id="button-redo"
>
</ha-icon-button>
<ha-tooltip placement="bottom" for="button-redo">
${this.hass.localize("ui.common.redo")}
<span class="shortcut"
>(
${isMac
? html`<span>${shortcutIcon}</span>
<span>+</span>
<span>Shift</span>
<span>+</span>
<span>Z</span>`
: html`<span>${shortcutIcon}</span>
<span>+</span>
<span>Y</span>`})
</span>
</ha-tooltip>`
</ha-icon-button>`
: nothing}
${this.scriptId && !this.narrow
? html`
@@ -1111,7 +1080,6 @@ export class HaScriptEditor extends UndoRedoMixin<
Delete: () => this._deleteSelectedRow(),
Backspace: () => this._deleteSelectedRow(),
z: () => this.undo(),
Z: () => this.redo(),
y: () => this.redo(),
};
}
@@ -1165,7 +1133,6 @@ export class HaScriptEditor extends UndoRedoMixin<
--ha-automation-editor-width,
1540px
);
--hass-subpage-bottom-inset: 0px;
}
.yaml-mode {
height: 100%;
@@ -1266,15 +1233,6 @@ export class HaScriptEditor extends UndoRedoMixin<
text-decoration: none;
color: var(--primary-color);
}
ha-tooltip ha-svg-icon {
width: 12px;
}
ha-tooltip .shortcut {
display: inline-flex;
flex-direction: row;
align-items: center;
gap: 2px;
}
`,
];
}

View File

@@ -161,7 +161,7 @@ export class HuiBadge extends ReactiveElement {
);
}
private _updateVisibility(ignoreConditions?: boolean) {
private _updateVisibility(forceVisible?: boolean) {
if (!this._element || !this.hass) {
return;
}
@@ -171,18 +171,9 @@ export class HuiBadge extends ReactiveElement {
return;
}
if (this.preview) {
this._setElementVisibility(true);
return;
}
if (this.config?.disabled) {
this._setElementVisibility(false);
return;
}
const visible =
ignoreConditions ||
forceVisible ||
this.preview ||
!this.config?.visibility ||
checkConditionsMet(this.config.visibility, this.hass);
this._setElementVisibility(visible);

View File

@@ -43,6 +43,8 @@ class HuiHistoryChartCardFeature
@state() private _coordinates?: [number, number][];
@state() private _yAxisOrigin?: number;
private _interval?: number;
static getStubConfig(): TrendGraphCardFeatureConfig {
@@ -105,7 +107,10 @@ class HuiHistoryChartCardFeature
`;
}
return html`
<hui-graph-base .coordinates=${this._coordinates}></hui-graph-base>
<hui-graph-base
.coordinates=${this._coordinates}
.yAxisOrigin=${this._yAxisOrigin}
></hui-graph-base>
`;
}
@@ -123,14 +128,15 @@ class HuiHistoryChartCardFeature
return subscribeHistoryStatesTimeWindow(
this.hass!,
(historyStates) => {
this._coordinates =
const { points, yAxisOrigin } =
coordinatesMinimalResponseCompressedState(
historyStates[this.context!.entity_id!],
hourToShow,
500,
2,
undefined
) || [];
this.clientWidth,
this.clientHeight,
this.clientWidth / 5 // sample to 1 point per 5 pixels
);
this._coordinates = points;
this._yAxisOrigin = yAxisOrigin;
},
hourToShow,
[this.context!.entity_id!]

View File

@@ -1,32 +1,30 @@
import { mdiWaterBoiler } from "@mdi/js";
import type { PropertyValues, TemplateResult } from "lit";
import { html, LitElement } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { customElement, property, state } from "lit/decorators";
import { styleMap } from "lit/directives/style-map";
import { stopPropagation } from "../../../common/dom/stop_propagation";
import { computeDomain } from "../../../common/entity/compute_domain";
import { stateColorCss } from "../../../common/entity/state_color";
import "../../../components/ha-control-button";
import "../../../components/ha-control-button-group";
import "../../../components/ha-control-select";
import type { ControlSelectOption } from "../../../components/ha-control-select";
import "../../../components/ha-control-select-menu";
import type { HaControlSelectMenu } from "../../../components/ha-control-select-menu";
import "../../../components/ha-list-item";
import "../../../components/ha-control-slider";
import { UNAVAILABLE } from "../../../data/entity";
import type {
OperationMode,
WaterHeaterEntity,
} from "../../../data/water_heater";
import {
computeOperationModeIcon,
compareWaterHeaterOperationMode,
computeOperationModeIcon,
} from "../../../data/water_heater";
import { UNAVAILABLE } from "../../../data/entity";
import type { HomeAssistant } from "../../../types";
import type { LovelaceCardFeature, LovelaceCardFeatureEditor } from "../types";
import { cardFeatureStyles } from "./common/card-feature-styles";
import { filterModes } from "./common/filter-modes";
import type {
WaterHeaterOperationModesCardFeatureConfig,
LovelaceCardFeatureContext,
WaterHeaterOperationModesCardFeatureConfig,
} from "./types";
export const supportsWaterHeaterOperationModesCardFeature = (
@@ -54,9 +52,6 @@ class HuiWaterHeaterOperationModeCardFeature
@state() _currentOperationMode?: OperationMode;
@query("ha-control-select-menu", true)
private _haSelect?: HaControlSelectMenu;
private get _stateObj() {
if (!this.hass || !this.context || !this.context.entity_id) {
return undefined;
@@ -102,23 +97,8 @@ class HuiWaterHeaterOperationModeCardFeature
}
}
protected updated(changedProps: PropertyValues) {
super.updated(changedProps);
if (this._haSelect && changedProps.has("hass")) {
const oldHass = changedProps.get("hass") as HomeAssistant | undefined;
if (
this.hass &&
this.hass.formatEntityAttributeValue !==
oldHass?.formatEntityAttributeValue
) {
this._haSelect.layoutOptions();
}
}
}
private async _valueChanged(ev: CustomEvent) {
const mode =
(ev.detail as any).value ?? ((ev.target as any).value as OperationMode);
const mode = (ev.detail as any).value as OperationMode;
if (mode === this._stateObj!.state) return;
@@ -163,48 +143,9 @@ class HuiWaterHeaterOperationModeCardFeature
).map<ControlSelectOption>((mode) => ({
value: mode,
label: this.hass!.formatEntityState(this._stateObj!, mode),
icon: html`
<ha-svg-icon
slot="graphic"
.path=${computeOperationModeIcon(mode as OperationMode)}
></ha-svg-icon>
`,
path: computeOperationModeIcon(mode as OperationMode),
}));
if (this._config.style === "dropdown") {
return html`
<ha-control-select-menu
show-arrow
hide-label
.label=${this.hass.localize("ui.card.water_heater.mode")}
.value=${this._currentOperationMode}
.disabled=${this._stateObj.state === UNAVAILABLE}
fixedMenuPosition
naturalMenuWidth
@selected=${this._valueChanged}
@closed=${stopPropagation}
>
${this._currentOperationMode
? html`
<ha-svg-icon
slot="icon"
.path=${computeOperationModeIcon(this._currentOperationMode)}
></ha-svg-icon>
`
: html`
<ha-svg-icon slot="icon" .path=${mdiWaterBoiler}></ha-svg-icon>
`}
${options.map(
(option) => html`
<ha-list-item .value=${option.value} graphic="icon">
${option.icon}${option.label}
</ha-list-item>
`
)}
</ha-control-select-menu>
`;
}
return html`
<ha-control-select
.options=${options}

View File

@@ -140,7 +140,6 @@ export interface ToggleCardFeatureConfig {
export interface WaterHeaterOperationModesCardFeatureConfig {
type: "water-heater-operation-modes";
style?: "dropdown" | "icons";
operation_modes?: OperationMode[];
}

View File

@@ -26,7 +26,6 @@ import {
} from "../../../../../common/datetime/format_date";
import { formatTime } from "../../../../../common/datetime/format_time";
import type { ECOption } from "../../../../../resources/echarts";
import { filterXSS } from "../../../../../common/util/xss";
export function getSuggestedMax(dayDifference: number, end: Date): number {
let suggestedMax = new Date(end);
@@ -192,7 +191,7 @@ function formatTooltip(
countNegative++;
}
}
return `${param.marker} ${filterXSS(param.seriesName!)}: ${value} ${unit}`;
return `${param.marker} ${param.seriesName}: ${value} ${unit}`;
})
.filter(Boolean);
let footer = "";

View File

@@ -6,7 +6,6 @@ import { classMap } from "lit/directives/class-map";
import memoizeOne from "memoize-one";
import type { BarSeriesOption } from "echarts/charts";
import type { ECElementEvent } from "echarts/types/dist/shared";
import { filterXSS } from "../../../../common/util/xss";
import { getGraphColorByIndex } from "../../../../common/color/colors";
import { formatNumber } from "../../../../common/number/format_number";
import "../../../../components/chart/ha-chart-base";
@@ -97,8 +96,9 @@ export class HuiEnergyDevicesGraphCard
}
private _renderTooltip(params: any) {
const deviceName = filterXSS(this._getDeviceName(params.value[1]));
const title = `<h4 style="text-align: center; margin: 0;">${deviceName}</h4>`;
const title = `<h4 style="text-align: center; margin: 0;">${this._getDeviceName(
params.value[1]
)}</h4>`;
const value = `${formatNumber(
params.value[0] as number,
this.hass.locale,

View File

@@ -1,134 +1,85 @@
import { strokeWidth } from "../../../../data/graph";
import { downSampleLineData } from "../../../../components/chart/down-sample";
import type { EntityHistoryState } from "../../../../data/history";
const average = (items: any[]): number =>
items.reduce((sum, entry) => sum + parseFloat(entry.state), 0) / items.length;
const lastValue = (items: any[]): number =>
parseFloat(items[items.length - 1].state) || 0;
const calcPoints = (
history: any,
hours: number,
history: [number, number][],
width: number,
detail: number,
min: number,
max: number
): [number, number][] => {
const coords = [] as [number, number][];
const height = 80;
let yRatio = (max - min) / height;
yRatio = yRatio !== 0 ? yRatio : height;
let xRatio = width / (hours - (detail === 1 ? 1 : 0));
xRatio = isFinite(xRatio) ? xRatio : width;
let first = history.filter(Boolean)[0];
if (detail > 1) {
first = first.filter(Boolean)[0];
}
let last = [average(first), lastValue(first)];
const getY = (value: number): number =>
height + strokeWidth / 2 - (value - min) / yRatio;
const getCoords = (item: any[], i: number, offset = 0, depth = 1) => {
if (depth > 1 && item) {
return item.forEach((subItem, index) =>
getCoords(subItem, i, index, depth - 1)
);
height: number,
limits?: { minX?: number; maxX?: number; minY?: number; maxY?: number }
) => {
let yAxisOrigin = height;
let minY = limits?.minY ?? history[0][1];
let maxY = limits?.maxY ?? history[0][1];
const minX = limits?.minX ?? history[0][0];
const maxX = limits?.maxX ?? history[history.length - 1][0];
history.forEach(([_, stateValue]) => {
if (stateValue < minY) {
minY = stateValue;
} else if (stateValue > maxY) {
maxY = stateValue;
}
const x = xRatio * (i + offset / 6);
if (item) {
last = [average(item), lastValue(item)];
}
const y = getY(item ? last[0] : last[1]);
return coords.push([x, y]);
};
for (let i = 0; i < history.length; i += 1) {
getCoords(history[i], i, 0, detail);
});
const rangeY = maxY - minY || minY * 0.1;
if (maxY < 0) {
// all values are negative
// add margin
maxY += rangeY * 0.1;
maxY = Math.min(0, maxY);
yAxisOrigin = 0;
} else if (minY < 0) {
// some values are negative
yAxisOrigin = (maxY / (maxY - minY || 1)) * height;
} else {
// all values are positive
// add margin
minY -= rangeY * 0.1;
minY = Math.max(0, minY);
}
coords.push([width, getY(last[1])]);
return coords;
const yDenom = maxY - minY || 1;
const xDenom = maxX - minX || 1;
const points: [number, number][] = history.map((point) => {
const x = ((point[0] - minX) / xDenom) * width;
const y = height - ((point[1] - minY) / yDenom) * height;
return [x, y];
});
points.push([width, points[points.length - 1][1]]);
return { points, yAxisOrigin };
};
export const coordinates = (
history: any,
hours: number,
history: [number, number][],
width: number,
detail: number,
limits?: { min?: number; max?: number }
): [number, number][] | undefined => {
history.forEach((item) => {
item.state = Number(item.state);
});
history = history.filter((item) => !Number.isNaN(item.state));
height: number,
maxDetails: number,
limits?: { minX?: number; maxX?: number; minY?: number; maxY?: number }
) => {
history = history.filter((item) => !Number.isNaN(item[1]));
const min =
limits?.min !== undefined
? limits.min
: Math.min(...history.map((item) => item.state));
const max =
limits?.max !== undefined
? limits.max
: Math.max(...history.map((item) => item.state));
const now = new Date().getTime();
const reduce = (res, item, point) => {
const age = now - new Date(item.last_changed).getTime();
let key = Math.abs(age / (1000 * 3600) - hours);
if (point) {
key = (key - Math.floor(key)) * 60;
key = Number((Math.round(key / 10) * 10).toString()[0]);
} else {
key = Math.floor(key);
}
if (!res[key]) {
res[key] = [];
}
res[key].push(item);
return res;
};
history = history.reduce((res, item) => reduce(res, item, false), []);
if (detail > 1) {
history = history.map((entry) =>
entry.reduce((res, item) => reduce(res, item, true), [])
);
}
if (!history.length) {
return undefined;
}
return calcPoints(history, hours, width, detail, min, max);
const sampledData: [number, number][] = downSampleLineData(
history,
maxDetails,
limits?.minX,
limits?.maxX
);
return calcPoints(sampledData, width, height, limits);
};
interface NumericEntityHistoryState {
state: number;
last_changed: number;
}
export const coordinatesMinimalResponseCompressedState = (
history: EntityHistoryState[],
hours: number,
history: EntityHistoryState[] | undefined,
width: number,
detail: number,
limits?: { min?: number; max?: number }
): [number, number][] | undefined => {
if (!history) {
return undefined;
height: number,
maxDetails: number,
limits?: { minX?: number; maxX?: number; minY?: number; maxY?: number }
) => {
if (!history?.length) {
return { points: [], yAxisOrigin: 0 };
}
const numericHistory: NumericEntityHistoryState[] = history.map((item) => ({
state: Number(item.s),
const mappedHistory: [number, number][] = history.map((item) => [
// With minimal response and compressed state, we don't have last_changed,
// so we use last_updated since its always the same as last_changed since
// we already filtered out states that are the same.
last_changed: item.lu * 1000,
}));
return coordinates(numericHistory, hours, width, detail, limits);
item.lu * 1000,
Number(item.s),
]);
return coordinates(mappedHistory, width, height, maxDetails, limits);
};

View File

@@ -6,20 +6,26 @@ import { getPath } from "../common/graph/get-path";
@customElement("hui-graph-base")
export class HuiGraphBase extends LitElement {
@property() public coordinates?: any;
@property({ attribute: false }) public coordinates?: number[][];
@property({ attribute: "y-axis-origin", type: Number })
public yAxisOrigin?: number;
@state() private _path?: string;
protected render(): TemplateResult {
const width = this.clientWidth || 500;
const height = this.clientHeight || width / 5;
const yAxisOrigin = this.yAxisOrigin ?? height;
return html`
${this._path
? svg`<svg width="100%" height="100%" viewBox="0 0 500 100" preserveAspectRatio="none">
? svg`<svg width="100%" height="100%" viewBox="0 0 ${width} ${height}" preserveAspectRatio="none">
<g>
<mask id="fill">
<path
class='fill'
fill='white'
d="${this._path} L 500, 100 L 0, 100 z"
d="${this._path} L ${width}, ${yAxisOrigin} L 0, ${yAxisOrigin} z"
/>
</mask>
<rect height="100%" width="100%" id="fill-rect" fill="var(--accent-color)" mask="url(#fill)"></rect>
@@ -38,7 +44,7 @@ export class HuiGraphBase extends LitElement {
<rect height="100%" width="100%" id="rect" fill="var(--accent-color)" mask="url(#line)"></rect>
</g>
</svg>`
: svg`<svg width="100%" height="100%" viewBox="0 0 500 100"></svg>`}
: svg`<svg width="100%" height="100%" viewBox="0 0 ${width} ${height}"></svg>`}
`;
}

View File

@@ -16,7 +16,6 @@ import type {
} from "../../card-features/types";
import type { LovelaceCardFeatureEditor } from "../../types";
import { compareWaterHeaterOperationMode } from "../../../../data/water_heater";
import type { LocalizeFunc } from "../../../../common/translations/localize";
type WaterHeaterOperationModesCardFeatureData =
WaterHeaterOperationModesCardFeatureConfig & {
@@ -40,27 +39,11 @@ export class HuiWaterHeaterOperationModesCardFeatureEditor
private _schema = memoizeOne(
(
localize: LocalizeFunc,
formatEntityState: FormatEntityStateFunc,
stateObj: HassEntity | undefined,
customizeModes: boolean
) =>
[
{
name: "style",
selector: {
select: {
multiple: false,
mode: "list",
options: ["dropdown", "icons"].map((mode) => ({
value: mode,
label: localize(
`ui.panel.lovelace.editor.features.types.water-heater-operation-modes.style_list.${mode}`
),
})),
},
},
},
{
name: "customize_modes",
selector: {
@@ -102,13 +85,11 @@ export class HuiWaterHeaterOperationModesCardFeatureEditor
: undefined;
const data: WaterHeaterOperationModesCardFeatureData = {
style: "icons",
...this._config,
customize_modes: this._config.operation_modes !== undefined,
};
const schema = this._schema(
this.hass.localize,
this.hass.formatEntityState,
stateObj,
data.customize_modes
@@ -150,7 +131,6 @@ export class HuiWaterHeaterOperationModesCardFeatureEditor
) => {
switch (schema.name) {
case "operation_modes":
case "style":
case "customize_modes":
return this.hass!.localize(
`ui.panel.lovelace.editor.features.types.water-heater-operation-modes.${schema.name}`

View File

@@ -1,7 +1,6 @@
import { object, string, any, optional, boolean } from "superstruct";
import { object, string, any } from "superstruct";
export const baseLovelaceBadgeConfig = object({
type: string(),
visibility: any(),
disabled: optional(boolean()),
});

View File

@@ -1,4 +1,4 @@
import { object, string, any, optional, boolean } from "superstruct";
import { object, string, any } from "superstruct";
export const baseLovelaceCardConfig = object({
type: string(),
@@ -6,5 +6,4 @@ export const baseLovelaceCardConfig = object({
layout_options: any(),
grid_options: any(),
visibility: any(),
disabled: optional(boolean()),
});

View File

@@ -153,14 +153,20 @@ export class HuiGraphHeaderFooter
// Message came in before we had a chance to unload
return;
}
this._coordinates =
coordinatesMinimalResponseCompressedState(
combinedHistory[this._config.entity],
this._config.hours_to_show!,
500,
this._config.detail!,
this._config.limits
) || [];
const width = this.clientWidth || this.offsetWidth;
// sample to 1 point per hour or 1 point per 5 pixels
const maxDetails =
this._config.detail! > 1
? Math.max(width / 5, this._config.hours_to_show!)
: this._config.hours_to_show!;
const { points } = coordinatesMinimalResponseCompressedState(
combinedHistory[this._config.entity],
width,
width / 5,
maxDetails,
{ minY: this._config.limits?.min, maxY: this._config.limits?.max }
);
this._coordinates = points;
},
this._config.hours_to_show!,
[this._config.entity]

View File

@@ -318,7 +318,7 @@ class HUIRoot extends LitElement {
menu-corner="END"
>
<ha-icon-button
.id="button-${index}"
.label=${label}
.path=${item.icon}
slot="trigger"
></ha-icon-button>
@@ -340,9 +340,6 @@ class HUIRoot extends LitElement {
`
)}
</ha-button-menu>
<ha-tooltip placement="bottom" .for="button-${index}">
${label}
</ha-tooltip>
`
: html`
<ha-icon-button

View File

@@ -4,14 +4,13 @@ import { isComponentLoaded } from "../../../../common/config/is_component_loaded
import type { LovelaceSectionConfig } from "../../../../data/lovelace/config/section";
import { getCommonControlUsagePrediction } from "../../../../data/usage_prediction";
import type { HomeAssistant } from "../../../../types";
import type { HeadingCardConfig, TileCardConfig } from "../../cards/types";
import type { TileCardConfig } from "../../cards/types";
const DEFAULT_LIMIT = 8;
export interface CommonControlSectionStrategyConfig {
type: "common-controls";
title?: string;
icon?: string;
limit?: number;
exclude_entities?: string[];
hide_empty?: boolean;
@@ -32,8 +31,7 @@ export class CommonControlsSectionStrategy extends ReactiveElement {
section.cards?.push({
type: "heading",
heading: config.title,
icon: config.icon,
} satisfies HeadingCardConfig);
});
}
if (!isComponentLoaded(hass, "usage_prediction")) {

View File

@@ -14,15 +14,7 @@ import {
polyfillTimeZoneData,
} from "./locale-data-polyfill";
let polyfilled = false;
const _polyfillTimeZoneData = polyfillTimeZoneData;
const polyfillIntl = async () => {
if (polyfilled) {
return;
}
polyfilled = true;
const locale = getLocalLanguage();
const polyfills: Promise<unknown>[] = [];
if (shouldPolyfillGetCanonicalLocales()) {
@@ -34,7 +26,7 @@ const polyfillIntl = async () => {
if (shouldPolyfillDateTimeFormat(locale)) {
polyfills.push(
import("@formatjs/intl-datetimeformat/polyfill-force").then(() =>
_polyfillTimeZoneData()
polyfillTimeZoneData()
)
);
}
@@ -66,7 +58,7 @@ const polyfillIntl = async () => {
if (polyfills.length === 0) {
return;
}
await Promise.allSettled(polyfills).then(() =>
await Promise.all(polyfills).then(() =>
// Load the default language
polyfillLocaleData(locale)
);

View File

@@ -157,13 +157,8 @@ export const haStyleDialog = css`
ha-dialog {
--mdc-dialog-min-width: 100vw;
--mdc-dialog-max-width: 100vw;
--mdc-dialog-min-height: 100vh;
--mdc-dialog-min-height: 100svh;
--mdc-dialog-max-height: 100vh;
--mdc-dialog-max-height: 100svh;
--dialog-surface-padding: var(--safe-area-inset-top)
var(--safe-area-inset-right) var(--safe-area-inset-bottom)
var(--safe-area-inset-left);
--mdc-dialog-min-height: 100%;
--mdc-dialog-max-height: 100%;
--vertical-align-dialog: flex-end;
--ha-dialog-border-radius: 0;
}

View File

@@ -19,29 +19,6 @@ export const coreStyles = css`
--ha-border-radius-pill: 9999px;
--ha-border-radius-circle: 50%;
--ha-border-radius-square: 0;
/* Spacing */
--ha-space-0: 0px;
--ha-space-1: 4px;
--ha-space-2: 8px;
--ha-space-3: 12px;
--ha-space-4: 16px;
--ha-space-5: 20px;
--ha-space-6: 24px;
--ha-space-7: 28px;
--ha-space-8: 32px;
--ha-space-9: 36px;
--ha-space-10: 40px;
--ha-space-11: 44px;
--ha-space-12: 48px;
--ha-space-13: 52px;
--ha-space-14: 56px;
--ha-space-15: 60px;
--ha-space-16: 64px;
--ha-space-17: 68px;
--ha-space-18: 72px;
--ha-space-19: 76px;
--ha-space-20: 80px;
}
`;

View File

@@ -8217,12 +8217,7 @@
"water-heater-operation-modes": {
"label": "Water heater operation modes",
"operation_modes": "Operation modes",
"customize_modes": "Customize operation modes",
"style": "[%key:ui::panel::lovelace::editor::features::types::climate-preset-modes::style%]",
"style_list": {
"dropdown": "[%key:ui::panel::lovelace::editor::features::types::climate-preset-modes::style_list::dropdown%]",
"icons": "[%key:ui::panel::lovelace::editor::features::types::climate-preset-modes::style_list::icons%]"
}
"customize_modes": "Customize operation modes"
},
"lawn-mower-commands": {
"label": "Lawn mower commands",

230
yarn.lock
View File

@@ -1351,10 +1351,10 @@ __metadata:
languageName: node
linkType: hard
"@ctrl/tinycolor@npm:4.1.0":
version: 4.1.0
resolution: "@ctrl/tinycolor@npm:4.1.0"
checksum: 10/e64569399139ef0abd2eb0ec9fb7267dfd7820f7ad7d4567a63e5fc35e5cfdcb8ecdb3bad65cb9244b47ba6c77bc51085826c00e981acf263a3221dc89343adc
"@ctrl/tinycolor@npm:^4.1.0":
version: 4.2.0
resolution: "@ctrl/tinycolor@npm:4.2.0"
checksum: 10/1be14de7d7e8184c0bc5c8d7e3486cc8186e6702e8ca899c7239f328bb1df9a15d1575e2af7b4c6ba020727fa78f5a9f887555971f30a2890cece9e4253a9d3a
languageName: node
linkType: hard
@@ -1940,11 +1940,11 @@ __metadata:
languageName: node
linkType: hard
"@home-assistant/webawesome@npm:3.0.0-beta.6.ha.4":
version: 3.0.0-beta.6.ha.4
resolution: "@home-assistant/webawesome@npm:3.0.0-beta.6.ha.4"
"@home-assistant/webawesome@npm:3.0.0-beta.4.ha.3":
version: 3.0.0-beta.4.ha.3
resolution: "@home-assistant/webawesome@npm:3.0.0-beta.4.ha.3"
dependencies:
"@ctrl/tinycolor": "npm:4.1.0"
"@ctrl/tinycolor": "npm:^4.1.0"
"@floating-ui/dom": "npm:^1.6.13"
"@lit/react": "npm:^1.0.8"
"@shoelace-style/animations": "npm:^1.2.0"
@@ -1953,7 +1953,8 @@ __metadata:
lit: "npm:^3.2.1"
nanoid: "npm:^5.1.5"
qr-creator: "npm:^1.0.0"
checksum: 10/d9072b321126ef458468ed2cf040e0b04cb2aff73336c6e742c0cfb25d9fb674b7672e7c9abcf5bcb0aa0b2fe953c20186f0910f485024c827bfe4cf399f10a4
style-observer: "npm:^0.0.7"
checksum: 10/b9241821ed471ccbad86b0ea4697a2d41395f05fdc26f46e5edbc7f6b5eeab5d248251ef702326312ded00d5bf850ce0dcdcf7cd5e2e542b9d9cb9a84f3726da
languageName: node
linkType: hard
@@ -4051,92 +4052,92 @@ __metadata:
languageName: node
linkType: hard
"@rspack/binding-darwin-arm64@npm:1.5.5":
version: 1.5.5
resolution: "@rspack/binding-darwin-arm64@npm:1.5.5"
"@rspack/binding-darwin-arm64@npm:1.5.6":
version: 1.5.6
resolution: "@rspack/binding-darwin-arm64@npm:1.5.6"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@rspack/binding-darwin-x64@npm:1.5.5":
version: 1.5.5
resolution: "@rspack/binding-darwin-x64@npm:1.5.5"
"@rspack/binding-darwin-x64@npm:1.5.6":
version: 1.5.6
resolution: "@rspack/binding-darwin-x64@npm:1.5.6"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@rspack/binding-linux-arm64-gnu@npm:1.5.5":
version: 1.5.5
resolution: "@rspack/binding-linux-arm64-gnu@npm:1.5.5"
"@rspack/binding-linux-arm64-gnu@npm:1.5.6":
version: 1.5.6
resolution: "@rspack/binding-linux-arm64-gnu@npm:1.5.6"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@rspack/binding-linux-arm64-musl@npm:1.5.5":
version: 1.5.5
resolution: "@rspack/binding-linux-arm64-musl@npm:1.5.5"
"@rspack/binding-linux-arm64-musl@npm:1.5.6":
version: 1.5.6
resolution: "@rspack/binding-linux-arm64-musl@npm:1.5.6"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@rspack/binding-linux-x64-gnu@npm:1.5.5":
version: 1.5.5
resolution: "@rspack/binding-linux-x64-gnu@npm:1.5.5"
"@rspack/binding-linux-x64-gnu@npm:1.5.6":
version: 1.5.6
resolution: "@rspack/binding-linux-x64-gnu@npm:1.5.6"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@rspack/binding-linux-x64-musl@npm:1.5.5":
version: 1.5.5
resolution: "@rspack/binding-linux-x64-musl@npm:1.5.5"
"@rspack/binding-linux-x64-musl@npm:1.5.6":
version: 1.5.6
resolution: "@rspack/binding-linux-x64-musl@npm:1.5.6"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@rspack/binding-wasm32-wasi@npm:1.5.5":
version: 1.5.5
resolution: "@rspack/binding-wasm32-wasi@npm:1.5.5"
"@rspack/binding-wasm32-wasi@npm:1.5.6":
version: 1.5.6
resolution: "@rspack/binding-wasm32-wasi@npm:1.5.6"
dependencies:
"@napi-rs/wasm-runtime": "npm:^1.0.5"
conditions: cpu=wasm32
languageName: node
linkType: hard
"@rspack/binding-win32-arm64-msvc@npm:1.5.5":
version: 1.5.5
resolution: "@rspack/binding-win32-arm64-msvc@npm:1.5.5"
"@rspack/binding-win32-arm64-msvc@npm:1.5.6":
version: 1.5.6
resolution: "@rspack/binding-win32-arm64-msvc@npm:1.5.6"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@rspack/binding-win32-ia32-msvc@npm:1.5.5":
version: 1.5.5
resolution: "@rspack/binding-win32-ia32-msvc@npm:1.5.5"
"@rspack/binding-win32-ia32-msvc@npm:1.5.6":
version: 1.5.6
resolution: "@rspack/binding-win32-ia32-msvc@npm:1.5.6"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
"@rspack/binding-win32-x64-msvc@npm:1.5.5":
version: 1.5.5
resolution: "@rspack/binding-win32-x64-msvc@npm:1.5.5"
"@rspack/binding-win32-x64-msvc@npm:1.5.6":
version: 1.5.6
resolution: "@rspack/binding-win32-x64-msvc@npm:1.5.6"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"@rspack/binding@npm:1.5.5":
version: 1.5.5
resolution: "@rspack/binding@npm:1.5.5"
"@rspack/binding@npm:1.5.6":
version: 1.5.6
resolution: "@rspack/binding@npm:1.5.6"
dependencies:
"@rspack/binding-darwin-arm64": "npm:1.5.5"
"@rspack/binding-darwin-x64": "npm:1.5.5"
"@rspack/binding-linux-arm64-gnu": "npm:1.5.5"
"@rspack/binding-linux-arm64-musl": "npm:1.5.5"
"@rspack/binding-linux-x64-gnu": "npm:1.5.5"
"@rspack/binding-linux-x64-musl": "npm:1.5.5"
"@rspack/binding-wasm32-wasi": "npm:1.5.5"
"@rspack/binding-win32-arm64-msvc": "npm:1.5.5"
"@rspack/binding-win32-ia32-msvc": "npm:1.5.5"
"@rspack/binding-win32-x64-msvc": "npm:1.5.5"
"@rspack/binding-darwin-arm64": "npm:1.5.6"
"@rspack/binding-darwin-x64": "npm:1.5.6"
"@rspack/binding-linux-arm64-gnu": "npm:1.5.6"
"@rspack/binding-linux-arm64-musl": "npm:1.5.6"
"@rspack/binding-linux-x64-gnu": "npm:1.5.6"
"@rspack/binding-linux-x64-musl": "npm:1.5.6"
"@rspack/binding-wasm32-wasi": "npm:1.5.6"
"@rspack/binding-win32-arm64-msvc": "npm:1.5.6"
"@rspack/binding-win32-ia32-msvc": "npm:1.5.6"
"@rspack/binding-win32-x64-msvc": "npm:1.5.6"
dependenciesMeta:
"@rspack/binding-darwin-arm64":
optional: true
@@ -4158,23 +4159,23 @@ __metadata:
optional: true
"@rspack/binding-win32-x64-msvc":
optional: true
checksum: 10/65b71796a3e8f1bc5a374253aafc128076cf1b02ac0ae8484eff897420152f1863c153dd9195ba84a8d2c4a41ab8a41d590b0645308f6035ab188c9c3d33b214
checksum: 10/852113a80ff7396257426a6a3a6c6fd47f5743c7304b90de9d348ed0496e5f335bcc0617f857be2d9e836fa610dd7a3952a1a834b756a228c4913acb78a3d3fa
languageName: node
linkType: hard
"@rspack/core@npm:1.5.5":
version: 1.5.5
resolution: "@rspack/core@npm:1.5.5"
"@rspack/core@npm:1.5.6":
version: 1.5.6
resolution: "@rspack/core@npm:1.5.6"
dependencies:
"@module-federation/runtime-tools": "npm:0.18.0"
"@rspack/binding": "npm:1.5.5"
"@rspack/binding": "npm:1.5.6"
"@rspack/lite-tapable": "npm:1.0.1"
peerDependencies:
"@swc/helpers": ">=0.5.1"
peerDependenciesMeta:
"@swc/helpers":
optional: true
checksum: 10/864e16e3370ee09cbe26a29220a59392f10e61b8ae1e258139c9939c2ecc20c8899e92357e67bdb81603ce102baa46e5bef916de3b39000828d40c54158ab816
checksum: 10/50814815c63b611c2e9a7724dfa194e8b52e7232fa18637ef17c6de79c36ceb798f1fd7501e869b24a4f4f4ab6c198c5ce43884be81e7421c82a0e4880dc9600
languageName: node
linkType: hard
@@ -4490,10 +4491,10 @@ __metadata:
languageName: node
linkType: hard
"@types/chromecast-caf-receiver@npm:6.0.22":
version: 6.0.22
resolution: "@types/chromecast-caf-receiver@npm:6.0.22"
checksum: 10/6c51cb52527776ddfa187a261b88184c98bdd61c129dd8719cba213894d565cf69073734d6473696ffd60a768f6fb5a3fe9932693f43174fbc5e7af201db8a90
"@types/chromecast-caf-receiver@npm:6.0.24":
version: 6.0.24
resolution: "@types/chromecast-caf-receiver@npm:6.0.24"
checksum: 10/1f2b95e8a15dbb36d5328895229d4a5cb255b33e62d46335bd6ed75e16aa9ea6a7d765a64ae120d19b3134fb3e51e9547d2544c7277f7bffe0bf0b3999f026da
languageName: node
linkType: hard
@@ -6620,7 +6621,7 @@ __metadata:
languageName: node
linkType: hard
"chalk@npm:^5.0.1, chalk@npm:^5.6.0":
"chalk@npm:^5.0.1":
version: 5.6.2
resolution: "chalk@npm:5.6.2"
checksum: 10/1b2f48f6fba1370670d5610f9cd54c391d6ede28f4b7062dd38244ea5768777af72e5be6b74fb6c6d54cb84c4a2dff3f3afa9b7cb5948f7f022cfd3d087989e0
@@ -6849,6 +6850,13 @@ __metadata:
languageName: node
linkType: hard
"commander@npm:14.0.1":
version: 14.0.1
resolution: "commander@npm:14.0.1"
checksum: 10/783115e9403caeca29c0fcbd4e0358f70c67760e4e4933f3453fcdd5ddba2ec44173c8da5213d7ce5e404f51c7e71203a42c548164dbe27b668b32a8981577f1
languageName: node
linkType: hard
"commander@npm:^10.0.0":
version: 10.0.1
resolution: "commander@npm:10.0.1"
@@ -6856,13 +6864,6 @@ __metadata:
languageName: node
linkType: hard
"commander@npm:^14.0.0":
version: 14.0.1
resolution: "commander@npm:14.0.1"
checksum: 10/783115e9403caeca29c0fcbd4e0358f70c67760e4e4933f3453fcdd5ddba2ec44173c8da5213d7ce5e404f51c7e71203a42c548164dbe27b668b32a8981577f1
languageName: node
linkType: hard
"commander@npm:^2.20.0, commander@npm:^2.20.3":
version: 2.20.3
resolution: "commander@npm:2.20.3"
@@ -9396,7 +9397,7 @@ __metadata:
"@fullcalendar/list": "npm:6.1.19"
"@fullcalendar/luxon3": "npm:6.1.19"
"@fullcalendar/timegrid": "npm:6.1.19"
"@home-assistant/webawesome": "npm:3.0.0-beta.6.ha.4"
"@home-assistant/webawesome": "npm:3.0.0-beta.4.ha.3"
"@lezer/highlight": "npm:1.2.1"
"@lit-labs/motion": "npm:1.0.9"
"@lit-labs/observers": "npm:2.0.6"
@@ -9434,14 +9435,14 @@ __metadata:
"@octokit/rest": "npm:22.0.0"
"@replit/codemirror-indentation-markers": "npm:6.5.3"
"@rsdoctor/rspack-plugin": "npm:1.2.3"
"@rspack/core": "npm:1.5.5"
"@rspack/core": "npm:1.5.6"
"@rspack/dev-server": "npm:1.1.4"
"@swc/helpers": "npm:0.5.17"
"@thomasloven/round-slider": "npm:0.6.0"
"@tsparticles/engine": "npm:3.9.1"
"@tsparticles/preset-links": "npm:3.2.0"
"@types/babel__plugin-transform-runtime": "npm:7.9.5"
"@types/chromecast-caf-receiver": "npm:6.0.22"
"@types/chromecast-caf-receiver": "npm:6.0.24"
"@types/chromecast-caf-sender": "npm:1.0.11"
"@types/color-name": "npm:2.0.0"
"@types/culori": "npm:4.0.1"
@@ -9513,7 +9514,7 @@ __metadata:
leaflet: "npm:1.9.4"
leaflet-draw: "patch:leaflet-draw@npm%3A1.0.4#./.yarn/patches/leaflet-draw-npm-1.0.4-0ca0ebcf65.patch"
leaflet.markercluster: "npm:1.5.3"
lint-staged: "npm:16.1.6"
lint-staged: "npm:16.2.0"
lit: "npm:3.3.1"
lit-analyzer: "npm:2.0.3"
lit-html: "npm:3.3.1"
@@ -9538,7 +9539,7 @@ __metadata:
sortablejs: "patch:sortablejs@npm%3A1.15.6#~/.yarn/patches/sortablejs-npm-1.15.6-3235a8f83b.patch"
stacktrace-js: "npm:2.0.2"
superstruct: "npm:2.0.2"
tar: "npm:7.4.3"
tar: "npm:7.4.4"
terser-webpack-plugin: "npm:5.3.14"
tinykeys: "npm:3.0.0"
ts-lit-plugin: "npm:2.0.2"
@@ -10860,13 +10861,6 @@ __metadata:
languageName: node
linkType: hard
"lilconfig@npm:^3.1.3":
version: 3.1.3
resolution: "lilconfig@npm:3.1.3"
checksum: 10/b932ce1af94985f0efbe8896e57b1f814a48c8dbd7fc0ef8469785c6303ed29d0090af3ccad7e36b626bfca3a4dc56cc262697e9a8dd867623cf09a39d54e4c3
languageName: node
linkType: hard
"lines-and-columns@npm:2.0.4":
version: 2.0.4
resolution: "lines-and-columns@npm:2.0.4"
@@ -10874,27 +10868,24 @@ __metadata:
languageName: node
linkType: hard
"lint-staged@npm:16.1.6":
version: 16.1.6
resolution: "lint-staged@npm:16.1.6"
"lint-staged@npm:16.2.0":
version: 16.2.0
resolution: "lint-staged@npm:16.2.0"
dependencies:
chalk: "npm:^5.6.0"
commander: "npm:^14.0.0"
debug: "npm:^4.4.1"
lilconfig: "npm:^3.1.3"
listr2: "npm:^9.0.3"
micromatch: "npm:^4.0.8"
nano-spawn: "npm:^1.0.2"
pidtree: "npm:^0.6.0"
string-argv: "npm:^0.3.2"
yaml: "npm:^2.8.1"
commander: "npm:14.0.1"
listr2: "npm:9.0.4"
micromatch: "npm:4.0.8"
nano-spawn: "npm:1.0.3"
pidtree: "npm:0.6.0"
string-argv: "npm:0.3.2"
yaml: "npm:2.8.1"
bin:
lint-staged: bin/lint-staged.js
checksum: 10/922b4392ae5d3d56130e4eba706c2fa6151d5da5e21f57ab601b1d6ce9cc635ceb5e4c3dc00e7da83ba8f0cb244b82604469c7ea1470b1e6b6ea0fc12454aa08
checksum: 10/809a42e21f2634c1a3e718dfb25786275a13b51c0cfaef6bb4bed509c656d31ee9b3e6231df55223b4b60cb37e4b5e3ebd958b239cabb529d2d07253cf7e1726
languageName: node
linkType: hard
"listr2@npm:^9.0.3":
"listr2@npm:9.0.4":
version: 9.0.4
resolution: "listr2@npm:9.0.4"
dependencies:
@@ -11271,7 +11262,7 @@ __metadata:
languageName: node
linkType: hard
"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.8":
"micromatch@npm:4.0.8, micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.8":
version: 4.0.8
resolution: "micromatch@npm:4.0.8"
dependencies:
@@ -11476,21 +11467,12 @@ __metadata:
languageName: node
linkType: hard
"minizlib@npm:^3.0.1":
version: 3.0.2
resolution: "minizlib@npm:3.0.2"
"minizlib@npm:^3.0.1, minizlib@npm:^3.1.0":
version: 3.1.0
resolution: "minizlib@npm:3.1.0"
dependencies:
minipass: "npm:^7.1.2"
checksum: 10/c075bed1594f68dcc8c35122333520112daefd4d070e5d0a228bd4cf5580e9eed3981b96c0ae1d62488e204e80fd27b2b9d0068ca9a5ef3993e9565faf63ca41
languageName: node
linkType: hard
"mkdirp@npm:^3.0.1":
version: 3.0.1
resolution: "mkdirp@npm:3.0.1"
bin:
mkdirp: dist/cjs/src/bin.js
checksum: 10/16fd79c28645759505914561e249b9a1f5fe3362279ad95487a4501e4467abeb714fd35b95307326b8fd03f3c7719065ef11a6f97b7285d7888306d1bd2232ba
checksum: 10/f47365cc2cb7f078cbe7e046eb52655e2e7e97f8c0a9a674f4da60d94fb0624edfcec9b5db32e8ba5a99a5f036f595680ae6fe02a262beaa73026e505cc52f99
languageName: node
linkType: hard
@@ -11534,7 +11516,7 @@ __metadata:
languageName: node
linkType: hard
"nano-spawn@npm:^1.0.2":
"nano-spawn@npm:1.0.3":
version: 1.0.3
resolution: "nano-spawn@npm:1.0.3"
checksum: 10/72c56e68ae733c81c459a338fd51e2aa3be06b1cca746c2abe83df7acfac7eee008b01833f5a8781f4ac9fc1eafd23036a44755257a669dfcc2ff2453850822a
@@ -12258,7 +12240,7 @@ __metadata:
languageName: node
linkType: hard
"pidtree@npm:^0.6.0":
"pidtree@npm:0.6.0":
version: 0.6.0
resolution: "pidtree@npm:0.6.0"
bin:
@@ -13785,7 +13767,7 @@ __metadata:
languageName: node
linkType: hard
"string-argv@npm:^0.3.2":
"string-argv@npm:0.3.2":
version: 0.3.2
resolution: "string-argv@npm:0.3.2"
checksum: 10/f9d3addf887026b4b5f997a271149e93bf71efc8692e7dc0816e8807f960b18bcb9787b45beedf0f97ff459575ee389af3f189d8b649834cac602f2e857e75af
@@ -14002,6 +13984,13 @@ __metadata:
languageName: node
linkType: hard
"style-observer@npm:^0.0.7":
version: 0.0.7
resolution: "style-observer@npm:0.0.7"
checksum: 10/bb57f98bae4463c1e1b57234f8ffe72ec0de27fb08b032c1919910129c210aacd1ddd615432b9453d491e10d3b719cf6c2a68a97165ca55d6fc9b86c0fca37fb
languageName: node
linkType: hard
"style-observer@npm:^0.0.8":
version: 0.0.8
resolution: "style-observer@npm:0.0.8"
@@ -14090,17 +14079,16 @@ __metadata:
languageName: node
linkType: hard
"tar@npm:7.4.3, tar@npm:^7.4.3":
version: 7.4.3
resolution: "tar@npm:7.4.3"
"tar@npm:7.4.4, tar@npm:^7.4.3":
version: 7.4.4
resolution: "tar@npm:7.4.4"
dependencies:
"@isaacs/fs-minipass": "npm:^4.0.0"
chownr: "npm:^3.0.0"
minipass: "npm:^7.1.2"
minizlib: "npm:^3.0.1"
mkdirp: "npm:^3.0.1"
minizlib: "npm:^3.1.0"
yallist: "npm:^5.0.0"
checksum: 10/12a2a4fc6dee23e07cc47f1aeb3a14a1afd3f16397e1350036a8f4cdfee8dcac7ef5978337a4e7b2ac2c27a9a6d46388fc2088ea7c80cb6878c814b1425f8ecf
checksum: 10/be7d95e019b029ac507e7cd4b23c243ba896b67d0837c4f53d18c32a5014a24b7b247e982f4d47147b8d637c491b35cc122e19e29246137ecb2b88a495aaf1fb
languageName: node
linkType: hard
@@ -16018,7 +16006,7 @@ __metadata:
languageName: node
linkType: hard
"yaml@npm:^2.8.1":
"yaml@npm:2.8.1":
version: 2.8.1
resolution: "yaml@npm:2.8.1"
bin: