mirror of
https://github.com/home-assistant/frontend.git
synced 2026-09-28 16:00:38 +00:00
Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a2b24fbcd | ||
|
|
89ab0b4a3d | ||
|
|
dd4cb1df72 | ||
|
|
b81cd37776 | ||
|
|
34112e7446 | ||
|
|
2dee45b465 | ||
|
|
10eb0a8b87 | ||
|
|
551035238f | ||
|
|
eb9359e9e1 |
+1
-1
@@ -210,7 +210,7 @@
|
||||
"lodash.template": "4.5.0",
|
||||
"map-stream": "0.0.7",
|
||||
"pinst": "3.0.0",
|
||||
"prettier": "3.5.3",
|
||||
"prettier": "3.6.0",
|
||||
"rspack-manifest-plugin": "5.0.3",
|
||||
"serve": "14.2.4",
|
||||
"sinon": "21.0.0",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { mdiContentSave, mdiMedal, mdiTrophy } from "@mdi/js";
|
||||
import { mdiHomeAssistant } from "../resources/home-assistant-logo-svg";
|
||||
import type { LocalizeKeys } from "../common/translations/localize";
|
||||
|
||||
/**
|
||||
@@ -26,11 +25,6 @@ export const QUALITY_SCALE_MAP: Record<
|
||||
translationKey:
|
||||
"ui.panel.config.integrations.config_entry.platinum_quality",
|
||||
},
|
||||
internal: {
|
||||
icon: mdiHomeAssistant,
|
||||
translationKey:
|
||||
"ui.panel.config.integrations.config_entry.internal_integration",
|
||||
},
|
||||
legacy: {
|
||||
icon: mdiContentSave,
|
||||
translationKey:
|
||||
|
||||
+6
-2
@@ -114,9 +114,13 @@ const getLogbookDataFromServer = (
|
||||
|
||||
export const subscribeLogbook = (
|
||||
hass: HomeAssistant,
|
||||
callbackFunction: (message: LogbookStreamMessage) => void,
|
||||
callbackFunction: (
|
||||
message: LogbookStreamMessage,
|
||||
subscriptionId: number
|
||||
) => void,
|
||||
startDate: string,
|
||||
endDate: string,
|
||||
subscriptionId: number,
|
||||
entityIds?: string[],
|
||||
deviceIds?: string[]
|
||||
): Promise<UnsubscribeFunc> => {
|
||||
@@ -140,7 +144,7 @@ export const subscribeLogbook = (
|
||||
params.device_ids = deviceIds;
|
||||
}
|
||||
return hass.connection.subscribeMessage<LogbookStreamMessage>(
|
||||
(message) => callbackFunction(message),
|
||||
(message) => callbackFunction(message, subscriptionId),
|
||||
params
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1317,9 +1317,13 @@ export class HaConfigDevicePage extends LitElement {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
(await showConfirmationDialog(this, {
|
||||
title: this.hass.localize(
|
||||
"ui.panel.config.devices.confirm_disable_config_entry",
|
||||
{ entry_name: config_entry.title }
|
||||
"ui.panel.config.devices.confirm_disable_config_entry_title"
|
||||
),
|
||||
text: this.hass.localize(
|
||||
"ui.panel.config.devices.confirm_disable_config_entry_message",
|
||||
{ name: config_entry.title }
|
||||
),
|
||||
destructive: true,
|
||||
confirmText: this.hass.localize("ui.common.yes"),
|
||||
dismissText: this.hass.localize("ui.common.no"),
|
||||
}))
|
||||
|
||||
@@ -196,9 +196,13 @@ class HaConfigEntryDeviceRow extends LitElement {
|
||||
!config_entry.disabled_by &&
|
||||
(await showConfirmationDialog(this, {
|
||||
title: this.hass.localize(
|
||||
"ui.panel.config.devices.confirm_disable_config_entry",
|
||||
{ entry_name: config_entry.title }
|
||||
"ui.panel.config.devices.confirm_disable_config_entry_title"
|
||||
),
|
||||
text: this.hass.localize(
|
||||
"ui.panel.config.devices.confirm_disable_config_entry_message",
|
||||
{ name: config_entry.title }
|
||||
),
|
||||
destructive: true,
|
||||
confirmText: this.hass.localize("ui.common.yes"),
|
||||
dismissText: this.hass.localize("ui.common.no"),
|
||||
}))
|
||||
@@ -230,9 +234,13 @@ class HaConfigEntryDeviceRow extends LitElement {
|
||||
if (disable) {
|
||||
const confirm = await showConfirmationDialog(this, {
|
||||
title: this.hass.localize(
|
||||
"ui.panel.config.integrations.config_entry.device.confirm_disable",
|
||||
"ui.panel.config.integrations.config_entry.device.confirm_disable_title"
|
||||
),
|
||||
text: this.hass.localize(
|
||||
"ui.panel.config.integrations.config_entry.device.confirm_disable_message",
|
||||
{ name: computeDeviceNameDisplay(this.device, this.hass) }
|
||||
),
|
||||
destructive: true,
|
||||
confirmText: this.hass.localize("ui.common.yes"),
|
||||
dismissText: this.hass.localize("ui.common.no"),
|
||||
});
|
||||
|
||||
@@ -405,47 +405,52 @@ class HaConfigEntryRow extends LitElement {
|
||||
</ha-md-list-item>
|
||||
${this._expanded
|
||||
? subEntries.length
|
||||
? html`<ha-md-list class="devices">
|
||||
<ha-md-list-item @click=${this._toggleOwnDevices} type="button">
|
||||
<ha-icon-button
|
||||
class="expand-button"
|
||||
.path=${this._devicesExpanded
|
||||
? mdiChevronDown
|
||||
: mdiChevronUp}
|
||||
slot="start"
|
||||
? html`${ownDevices.length
|
||||
? html`<ha-md-list class="devices">
|
||||
<ha-md-list-item
|
||||
@click=${this._toggleOwnDevices}
|
||||
type="button"
|
||||
>
|
||||
</ha-icon-button>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.integrations.config_entry.devices_without_subentry"
|
||||
)}
|
||||
</ha-md-list-item>
|
||||
${this._devicesExpanded
|
||||
? ownDevices.map(
|
||||
(device) =>
|
||||
html`<ha-config-entry-device-row
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.entry=${item}
|
||||
.device=${device}
|
||||
.entities=${entities}
|
||||
></ha-config-entry-device-row>`
|
||||
)
|
||||
: nothing}
|
||||
</ha-md-list>
|
||||
${subEntries.map(
|
||||
(subEntry) => html`
|
||||
<ha-config-sub-entry-row
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.manifest=${this.manifest}
|
||||
.diagnosticHandler=${this.diagnosticHandler}
|
||||
.entities=${this.entities}
|
||||
.entry=${item}
|
||||
.subEntry=${subEntry}
|
||||
data-entry-id=${item.entry_id}
|
||||
></ha-config-sub-entry-row>
|
||||
`
|
||||
)}`
|
||||
<ha-icon-button
|
||||
class="expand-button"
|
||||
.path=${this._devicesExpanded
|
||||
? mdiChevronDown
|
||||
: mdiChevronUp}
|
||||
slot="start"
|
||||
>
|
||||
</ha-icon-button>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.integrations.config_entry.devices_without_subentry"
|
||||
)}
|
||||
</ha-md-list-item>
|
||||
${this._devicesExpanded
|
||||
? ownDevices.map(
|
||||
(device) =>
|
||||
html`<ha-config-entry-device-row
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.entry=${item}
|
||||
.device=${device}
|
||||
.entities=${entities}
|
||||
></ha-config-entry-device-row>`
|
||||
)
|
||||
: nothing}
|
||||
</ha-md-list>`
|
||||
: nothing}
|
||||
${subEntries.map(
|
||||
(subEntry) => html`
|
||||
<ha-config-sub-entry-row
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.manifest=${this.manifest}
|
||||
.diagnosticHandler=${this.diagnosticHandler}
|
||||
.entities=${this.entities}
|
||||
.entry=${item}
|
||||
.subEntry=${subEntry}
|
||||
data-entry-id=${item.entry_id}
|
||||
></ha-config-sub-entry-row>
|
||||
`
|
||||
)}`
|
||||
: html`
|
||||
${ownDevices.map(
|
||||
(device) =>
|
||||
@@ -740,6 +745,10 @@ class HaConfigEntryRow extends LitElement {
|
||||
border-radius: var(--ha-card-border-radius, 12px);
|
||||
padding: 0;
|
||||
}
|
||||
:host([narrow]) {
|
||||
margin-left: -12px;
|
||||
margin-right: -12px;
|
||||
}
|
||||
ha-md-list.devices {
|
||||
margin: 16px;
|
||||
margin-top: 0;
|
||||
|
||||
@@ -541,8 +541,9 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
||||
<ha-button
|
||||
slot="action"
|
||||
@click=${this._handleDisableDebugLogging}
|
||||
>${this.hass.localize("ui.common.disable")}</ha-button
|
||||
>
|
||||
${this.hass.localize("ui.common.disable")}
|
||||
</ha-button>
|
||||
</ha-alert>
|
||||
</div>`
|
||||
: nothing}
|
||||
@@ -953,6 +954,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
||||
}
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
.section {
|
||||
@@ -1007,9 +1009,6 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
||||
ha-svg-icon.platinum-quality {
|
||||
color: #727272;
|
||||
}
|
||||
ha-svg-icon.internal-quality {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
ha-svg-icon.legacy-quality {
|
||||
color: var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38));
|
||||
animation: unset;
|
||||
|
||||
@@ -88,6 +88,8 @@ export class HaLogbook extends LitElement {
|
||||
1000
|
||||
);
|
||||
|
||||
private _logbookSubscriptionId = 0;
|
||||
|
||||
protected render() {
|
||||
if (!isComponentLoaded(this.hass, "logbook")) {
|
||||
return nothing;
|
||||
@@ -278,13 +280,20 @@ export class HaLogbook extends LitElement {
|
||||
}
|
||||
|
||||
try {
|
||||
this._logbookSubscriptionId++;
|
||||
|
||||
this._unsubLogbook = subscribeLogbook(
|
||||
this.hass,
|
||||
(streamMessage) => {
|
||||
(streamMessage, subscriptionId) => {
|
||||
if (subscriptionId !== this._logbookSubscriptionId) {
|
||||
// Ignore messages from previous subscriptions
|
||||
return;
|
||||
}
|
||||
this._processOrQueueStreamMessage(streamMessage);
|
||||
},
|
||||
logbookPeriod.startTime.toISOString(),
|
||||
logbookPeriod.endTime.toISOString(),
|
||||
this._logbookSubscriptionId,
|
||||
this.entityIds,
|
||||
this.deviceIds
|
||||
);
|
||||
|
||||
@@ -96,15 +96,6 @@ export class AreasOverviewViewStrategy extends ReactiveElement {
|
||||
area: area.area_id,
|
||||
display_type: "compact",
|
||||
sensor_classes: ["temperature", "humidity"],
|
||||
alert_classes: [
|
||||
"water_leak",
|
||||
"smoke",
|
||||
"gas",
|
||||
"co",
|
||||
"motion",
|
||||
"occupancy",
|
||||
"presence",
|
||||
],
|
||||
exclude_entities: hiddenEntities,
|
||||
features: filteredControls.length
|
||||
? [
|
||||
|
||||
+11
-10
@@ -4193,13 +4193,13 @@
|
||||
"mode_after": "[%key:ui::panel::config::automation::editor::conditions::type::time::after%]",
|
||||
"mode_before": "[%key:ui::panel::config::automation::editor::conditions::type::time::before%]",
|
||||
"weekdays": {
|
||||
"mon": "Monday",
|
||||
"tue": "Tuesday",
|
||||
"wed": "Wednesday",
|
||||
"thu": "Thursday",
|
||||
"fri": "Friday",
|
||||
"sat": "Saturday",
|
||||
"sun": "Sunday"
|
||||
"mon": "[%key:ui::weekdays::monday%]",
|
||||
"tue": "[%key:ui::weekdays::tuesday%]",
|
||||
"wed": "[%key:ui::weekdays::wednesday%]",
|
||||
"thu": "[%key:ui::weekdays::thursday%]",
|
||||
"fri": "[%key:ui::weekdays::friday%]",
|
||||
"sat": "[%key:ui::weekdays::saturday%]",
|
||||
"sun": "[%key:ui::weekdays::sunday%]"
|
||||
},
|
||||
"description": {
|
||||
"picker": "If the current time is before or after a specified time.",
|
||||
@@ -5128,7 +5128,8 @@
|
||||
"disabled_entities": "+{count} disabled {count, plural,\n one {entity}\n other {entities}\n}",
|
||||
"hidden": "Hidden"
|
||||
},
|
||||
"confirm_disable_config_entry": "There are no more devices for the config entry {entry_name}, do you want to instead disable the config entry?",
|
||||
"confirm_disable_config_entry_title": "Disable config entry?",
|
||||
"confirm_disable_config_entry_message": "There are no more devices for the config entry {name}, do you want to instead disable the config entry?",
|
||||
"update_device_error": "Updating the device failed",
|
||||
"disabled": "Disabled",
|
||||
"data_table": {
|
||||
@@ -5379,7 +5380,8 @@
|
||||
"device": {
|
||||
"enable": "Enable device",
|
||||
"disable": "Disable device",
|
||||
"confirm_disable": "Are you sure you want to disable {name}?",
|
||||
"confirm_disable_title": "Disable device?",
|
||||
"confirm_disable_message": "Are you sure you want to disable {name} and all of it’s entities?",
|
||||
"configure": "Configure device",
|
||||
"delete": "Remove device"
|
||||
},
|
||||
@@ -5433,7 +5435,6 @@
|
||||
}
|
||||
},
|
||||
"custom_integration": "Custom integration",
|
||||
"internal_integration": "Internal integration",
|
||||
"legacy_integration": "Legacy integration",
|
||||
"custom_overwrites_core": "Custom integration that replaces a core component",
|
||||
"depends_on_cloud": "Requires Internet",
|
||||
|
||||
@@ -9406,7 +9406,7 @@ __metadata:
|
||||
node-vibrant: "npm:4.0.3"
|
||||
object-hash: "npm:3.0.0"
|
||||
pinst: "npm:3.0.0"
|
||||
prettier: "npm:3.5.3"
|
||||
prettier: "npm:3.6.0"
|
||||
punycode: "npm:2.3.1"
|
||||
qr-scanner: "npm:1.4.2"
|
||||
qrcode: "npm:1.5.4"
|
||||
@@ -12245,12 +12245,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"prettier@npm:3.5.3":
|
||||
version: 3.5.3
|
||||
resolution: "prettier@npm:3.5.3"
|
||||
"prettier@npm:3.6.0":
|
||||
version: 3.6.0
|
||||
resolution: "prettier@npm:3.6.0"
|
||||
bin:
|
||||
prettier: bin/prettier.cjs
|
||||
checksum: 10/7050c08f674d9e49fbd9a4c008291d0715471f64e94cc5e4b01729affce221dfc6875c8de7e66b728c64abc9352eefb7eaae071b5f79d30081be207b53774b78
|
||||
checksum: 10/5c0db5a8e32d2ac9824d8bc652990dfd534bc7a7c6f26d99d50c9146a2d9befb3cd1cc86c4aee71caf6b264d421a4b4b5961e31a62dda3790b8fec2521a76eef
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user