mirror of
https://github.com/home-assistant/frontend.git
synced 2026-02-04 07:18:12 +00:00
Compare commits
7 Commits
20260128.4
...
rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d843349865 | ||
|
|
ec23164aa9 | ||
|
|
e74ef11101 | ||
|
|
a222f6a736 | ||
|
|
ef3dd16d45 | ||
|
|
5d4e1d205e | ||
|
|
1ee5ebbe75 |
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "home-assistant-frontend"
|
||||
version = "20260128.4"
|
||||
version = "20260128.5"
|
||||
license = "Apache-2.0"
|
||||
license-files = ["LICENSE*"]
|
||||
description = "The Home Assistant frontend"
|
||||
|
||||
@@ -51,6 +51,7 @@ export class HaCard extends LitElement {
|
||||
font-weight: var(--ha-font-weight-normal);
|
||||
}
|
||||
|
||||
/* clean-css ignore:start */
|
||||
:host
|
||||
::slotted(
|
||||
.card-content:not(:nth-child(1 of .card-content, .card-header))
|
||||
@@ -59,6 +60,7 @@ export class HaCard extends LitElement {
|
||||
padding-top: 0;
|
||||
margin-top: calc(var(--ha-space-2) * -1);
|
||||
}
|
||||
/* clean-css ignore:end */
|
||||
|
||||
:host ::slotted(.card-content) {
|
||||
padding: var(--ha-space-4);
|
||||
|
||||
@@ -76,6 +76,18 @@ export class HaDialog extends DialogBase {
|
||||
var(--divider-color)
|
||||
);
|
||||
z-index: var(--dialog-z-index, 8);
|
||||
--mdc-dialog-box-shadow: var(--dialog-box-shadow, none);
|
||||
--mdc-typography-headline6-font-weight: var(--ha-font-weight-normal);
|
||||
--mdc-typography-headline6-font-size: 1.574rem;
|
||||
}
|
||||
.mdc-dialog::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
pointer-events: none;
|
||||
-webkit-backdrop-filter: var(
|
||||
--ha-dialog-scrim-backdrop-filter,
|
||||
var(--dialog-backdrop-filter, none)
|
||||
@@ -84,9 +96,6 @@ export class HaDialog extends DialogBase {
|
||||
--ha-dialog-scrim-backdrop-filter,
|
||||
var(--dialog-backdrop-filter, none)
|
||||
);
|
||||
--mdc-dialog-box-shadow: var(--dialog-box-shadow, none);
|
||||
--mdc-typography-headline6-font-weight: var(--ha-font-weight-normal);
|
||||
--mdc-typography-headline6-font-size: 1.574rem;
|
||||
}
|
||||
.mdc-dialog .mdc-dialog__scrim {
|
||||
background-color: var(--mdc-dialog-scrim-color, none);
|
||||
|
||||
@@ -239,9 +239,8 @@ class HaConfigAreaPage extends LitElement {
|
||||
${this.hass.localize("ui.panel.config.areas.edit_settings")}
|
||||
</ha-dropdown-item>
|
||||
|
||||
<ha-dropdown-item value="delete">
|
||||
<ha-svg-icon class="warning" slot="icon" .path=${mdiDelete}>
|
||||
</ha-svg-icon>
|
||||
<ha-dropdown-item value="delete" variant="danger">
|
||||
<ha-svg-icon slot="icon" .path=${mdiDelete}> </ha-svg-icon>
|
||||
${this.hass.localize("ui.panel.config.areas.editor.delete")}
|
||||
</ha-dropdown-item>
|
||||
</ha-dropdown>
|
||||
|
||||
@@ -224,9 +224,8 @@ export class HaConfigAreasDashboard extends LitElement {
|
||||
"ui.panel.config.areas.picker.floor.edit_floor"
|
||||
)}</ha-dropdown-item
|
||||
>
|
||||
<ha-dropdown-item value="delete" class="warning"
|
||||
<ha-dropdown-item value="delete" variant="danger"
|
||||
><ha-svg-icon
|
||||
class="warning"
|
||||
.path=${mdiDelete}
|
||||
slot="icon"
|
||||
></ha-svg-icon
|
||||
@@ -727,9 +726,6 @@ export class HaConfigAreasDashboard extends LitElement {
|
||||
align-items: center;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.warning {
|
||||
color: var(--error-color);
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ class HaConfigBackupDetails extends LitElement {
|
||||
<ha-svg-icon slot="icon" .path=${mdiDownload}></ha-svg-icon>
|
||||
${this.hass.localize("ui.common.download")}
|
||||
</ha-dropdown-item>
|
||||
<ha-dropdown-item value="delete" class="warning">
|
||||
<ha-dropdown-item value="delete" variant="danger">
|
||||
<ha-svg-icon slot="icon" .path=${mdiDelete}></ha-svg-icon>
|
||||
${this.hass.localize("ui.common.delete")}
|
||||
</ha-dropdown-item>
|
||||
@@ -385,12 +385,6 @@ class HaConfigBackupDetails extends LitElement {
|
||||
--mdc-icon-size: 48px;
|
||||
color: var(--primary-text-color);
|
||||
}
|
||||
.warning {
|
||||
color: var(--error-color);
|
||||
}
|
||||
.warning ha-svg-icon {
|
||||
color: var(--error-color);
|
||||
}
|
||||
ha-button.danger {
|
||||
--mdc-theme-primary: var(--error-color);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,8 @@ import "../../../../components/ha-dropdown";
|
||||
import "../../../../components/ha-dropdown-item";
|
||||
import type { HaMdMenu } from "../../../../components/ha-md-menu";
|
||||
import "../../../../components/ha-md-menu-item";
|
||||
import "../../../../components/ha-md-menu";
|
||||
import "../../../../components/ha-md-divider";
|
||||
import "../../../../components/search-input-outlined";
|
||||
import type {
|
||||
StatisticsMetaData,
|
||||
|
||||
@@ -80,7 +80,7 @@ export class DialogLovelaceDashboardDetail extends LitElement {
|
||||
)}
|
||||
>
|
||||
<div>
|
||||
${this._params.dashboard && !this._params.dashboard.id
|
||||
${this._params.dashboard?.mode === "yaml"
|
||||
? this.hass.localize(
|
||||
"ui.panel.config.lovelace.dashboards.cant_edit_yaml"
|
||||
)
|
||||
@@ -97,7 +97,7 @@ export class DialogLovelaceDashboardDetail extends LitElement {
|
||||
</div>
|
||||
${this._params.urlPath
|
||||
? html`
|
||||
${this._params.dashboard?.id
|
||||
${this._params.dashboard?.mode === "storage"
|
||||
? html`
|
||||
<ha-button
|
||||
slot="secondaryAction"
|
||||
@@ -123,7 +123,7 @@ export class DialogLovelaceDashboardDetail extends LitElement {
|
||||
dialogInitialFocus
|
||||
>
|
||||
${this._params.urlPath
|
||||
? this._params.dashboard?.id
|
||||
? this._params.dashboard?.mode === "storage"
|
||||
? this.hass.localize(
|
||||
"ui.panel.config.lovelace.dashboards.detail.update"
|
||||
)
|
||||
@@ -232,8 +232,9 @@ export class DialogLovelaceDashboardDetail extends LitElement {
|
||||
}
|
||||
|
||||
private async _updateDashboard() {
|
||||
if (this._params?.urlPath && !this._params.dashboard?.id) {
|
||||
if (this._params?.urlPath && this._params.dashboard?.mode === "yaml") {
|
||||
this.closeDialog();
|
||||
return;
|
||||
}
|
||||
this._submitting = true;
|
||||
try {
|
||||
|
||||
@@ -281,7 +281,8 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
||||
action: () => this._handleSetAsDefault(dashboard),
|
||||
disabled: dashboard.default,
|
||||
},
|
||||
...(dashboard.type === "user_created"
|
||||
...(dashboard.type === "user_created" &&
|
||||
dashboard.mode === "storage"
|
||||
? [
|
||||
{
|
||||
path: mdiPencil,
|
||||
|
||||
@@ -394,7 +394,6 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
||||
"ui.panel.lovelace.cards.todo-list.clear_items"
|
||||
)}
|
||||
<ha-svg-icon
|
||||
class="warning"
|
||||
slot="icon"
|
||||
.path=${mdiDeleteSweep}
|
||||
>
|
||||
|
||||
@@ -152,13 +152,9 @@ export class HuiBadgeEditMode extends LitElement {
|
||||
${this.hass.localize("ui.panel.lovelace.editor.edit_card.cut")}
|
||||
</ha-dropdown-item>
|
||||
<wa-divider></wa-divider>
|
||||
<ha-dropdown-item value="delete" class="warning">
|
||||
<ha-dropdown-item value="delete" variant="danger">
|
||||
${this.hass.localize("ui.panel.lovelace.editor.edit_card.delete")}
|
||||
<ha-svg-icon
|
||||
class="warning"
|
||||
slot="icon"
|
||||
.path=${mdiDelete}
|
||||
></ha-svg-icon>
|
||||
<ha-svg-icon slot="icon" .path=${mdiDelete}></ha-svg-icon>
|
||||
</ha-dropdown-item>
|
||||
</ha-dropdown>
|
||||
</div>
|
||||
|
||||
@@ -253,11 +253,6 @@ export class HomeAreaViewStrategy extends ReactiveElement {
|
||||
device_class: "battery",
|
||||
});
|
||||
|
||||
const energyFilter = generateEntityFilter(hass, {
|
||||
domain: "sensor",
|
||||
device_class: ["energy", "power"],
|
||||
});
|
||||
|
||||
const primaryFilter = generateEntityFilter(hass, {
|
||||
entity_category: "none",
|
||||
});
|
||||
@@ -269,7 +264,7 @@ export class HomeAreaViewStrategy extends ReactiveElement {
|
||||
batteryFilter(e)
|
||||
);
|
||||
const entities = deviceEntities.entities.filter(
|
||||
(e) => !batteryFilter(e) && !energyFilter(e) && primaryFilter(e)
|
||||
(e) => !batteryFilter(e) && primaryFilter(e)
|
||||
);
|
||||
|
||||
if (entities.length === 0) {
|
||||
|
||||
@@ -14,6 +14,7 @@ import type { HomeAssistant } from "../../../../types";
|
||||
import { isHelperDomain } from "../../../config/helpers/const";
|
||||
import type {
|
||||
EmptyStateCardConfig,
|
||||
EntitiesCardConfig,
|
||||
HeadingCardConfig,
|
||||
} from "../../cards/types";
|
||||
import { OTHER_DEVICES_FILTERS } from "./helpers/other-devices-filters";
|
||||
@@ -78,16 +79,6 @@ export class HomeOtherDevicesViewStrategy extends ReactiveElement {
|
||||
return !isHelperDomain(domain);
|
||||
});
|
||||
|
||||
const batteryFilter = generateEntityFilter(hass, {
|
||||
domain: "sensor",
|
||||
device_class: "battery",
|
||||
});
|
||||
|
||||
const energyFilter = generateEntityFilter(hass, {
|
||||
domain: "sensor",
|
||||
device_class: ["energy", "power"],
|
||||
});
|
||||
|
||||
const primaryFilter = generateEntityFilter(hass, {
|
||||
entity_category: "none",
|
||||
});
|
||||
@@ -95,12 +86,7 @@ export class HomeOtherDevicesViewStrategy extends ReactiveElement {
|
||||
for (const deviceEntities of devicesEntities) {
|
||||
if (deviceEntities.entities.length === 0) continue;
|
||||
|
||||
const batteryEntities = deviceEntities.entities.filter((e) =>
|
||||
batteryFilter(e)
|
||||
);
|
||||
const entities = deviceEntities.entities.filter(
|
||||
(e) => !batteryFilter(e) && !energyFilter(e) && primaryFilter(e)
|
||||
);
|
||||
const entities = deviceEntities.entities.filter((e) => primaryFilter(e));
|
||||
|
||||
if (entities.length === 0) {
|
||||
continue;
|
||||
@@ -129,13 +115,6 @@ export class HomeOtherDevicesViewStrategy extends ReactiveElement {
|
||||
}
|
||||
: { action: "none" },
|
||||
badges: [
|
||||
...batteryEntities.slice(0, 1).map((e) => ({
|
||||
entity: e,
|
||||
type: "entity",
|
||||
tap_action: {
|
||||
action: "more-info",
|
||||
},
|
||||
})),
|
||||
...(config.home_panel && device && hass.user?.is_admin
|
||||
? [
|
||||
{
|
||||
@@ -156,13 +135,13 @@ export class HomeOtherDevicesViewStrategy extends ReactiveElement {
|
||||
: []),
|
||||
],
|
||||
} satisfies HeadingCardConfig,
|
||||
...entities.map((e) => ({
|
||||
type: "tile",
|
||||
entity: e,
|
||||
name: {
|
||||
type: "entity",
|
||||
},
|
||||
})),
|
||||
{
|
||||
type: "entities",
|
||||
entities: entities.map((e) => ({
|
||||
entity: e,
|
||||
name: { type: "entity" },
|
||||
})),
|
||||
} satisfies EntitiesCardConfig,
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user