mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 12:26:35 +00:00
Merge branch 'rc'
This commit is contained in:
commit
6a3c58d20f
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "home-assistant-frontend"
|
name = "home-assistant-frontend"
|
||||||
version = "20250702.1"
|
version = "20250702.2"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
license-files = ["LICENSE*"]
|
license-files = ["LICENSE*"]
|
||||||
description = "The Home Assistant frontend"
|
description = "The Home Assistant frontend"
|
||||||
|
@ -433,6 +433,7 @@ export class HaFloorPicker extends LitElement {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._setValue(value);
|
this._setValue(value);
|
||||||
|
@ -14,6 +14,7 @@ import {
|
|||||||
mdiTooltipAccount,
|
mdiTooltipAccount,
|
||||||
mdiViewDashboard,
|
mdiViewDashboard,
|
||||||
} from "@mdi/js";
|
} from "@mdi/js";
|
||||||
|
import type { UnsubscribeFunc } from "home-assistant-js-websocket";
|
||||||
import type { CSSResultGroup, PropertyValues } from "lit";
|
import type { CSSResultGroup, PropertyValues } from "lit";
|
||||||
import { LitElement, css, html, nothing } from "lit";
|
import { LitElement, css, html, nothing } from "lit";
|
||||||
import {
|
import {
|
||||||
@ -205,6 +206,8 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
|||||||
|
|
||||||
private _recentKeydownActiveUntil = 0;
|
private _recentKeydownActiveUntil = 0;
|
||||||
|
|
||||||
|
private _unsubPersistentNotifications: UnsubscribeFunc | undefined;
|
||||||
|
|
||||||
@query(".tooltip") private _tooltip!: HTMLDivElement;
|
@query(".tooltip") private _tooltip!: HTMLDivElement;
|
||||||
|
|
||||||
public hassSubscribe() {
|
public hassSubscribe() {
|
||||||
@ -227,9 +230,6 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
subscribeNotifications(this.hass.connection, (notifications) => {
|
|
||||||
this._notifications = notifications;
|
|
||||||
}),
|
|
||||||
...(this.hass.user?.is_admin
|
...(this.hass.user?.is_admin
|
||||||
? [
|
? [
|
||||||
subscribeRepairsIssueRegistry(this.hass.connection!, (repairs) => {
|
subscribeRepairsIssueRegistry(this.hass.connection!, (repairs) => {
|
||||||
@ -300,6 +300,23 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected firstUpdated(changedProps: PropertyValues) {
|
||||||
|
super.firstUpdated(changedProps);
|
||||||
|
this._subscribePersistentNotifications();
|
||||||
|
}
|
||||||
|
|
||||||
|
private _subscribePersistentNotifications(): void {
|
||||||
|
if (this._unsubPersistentNotifications) {
|
||||||
|
this._unsubPersistentNotifications();
|
||||||
|
}
|
||||||
|
this._unsubPersistentNotifications = subscribeNotifications(
|
||||||
|
this.hass.connection,
|
||||||
|
(notifications) => {
|
||||||
|
this._notifications = notifications;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
protected updated(changedProps) {
|
protected updated(changedProps) {
|
||||||
super.updated(changedProps);
|
super.updated(changedProps);
|
||||||
if (changedProps.has("alwaysExpand")) {
|
if (changedProps.has("alwaysExpand")) {
|
||||||
@ -311,6 +328,14 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
|||||||
|
|
||||||
const oldHass = changedProps.get("hass") as HomeAssistant | undefined;
|
const oldHass = changedProps.get("hass") as HomeAssistant | undefined;
|
||||||
|
|
||||||
|
if (
|
||||||
|
this.hass &&
|
||||||
|
oldHass?.connected === false &&
|
||||||
|
this.hass.connected === true
|
||||||
|
) {
|
||||||
|
this._subscribePersistentNotifications();
|
||||||
|
}
|
||||||
|
|
||||||
this._calculateCounts();
|
this._calculateCounts();
|
||||||
|
|
||||||
if (!SUPPORT_SCROLL_IF_NEEDED) {
|
if (!SUPPORT_SCROLL_IF_NEEDED) {
|
||||||
|
@ -354,7 +354,10 @@ const getIconFromTranslations = (
|
|||||||
}
|
}
|
||||||
// Then check for range-based icons if we have a numeric state
|
// Then check for range-based icons if we have a numeric state
|
||||||
if (state !== undefined && translations.range && !isNaN(Number(state))) {
|
if (state !== undefined && translations.range && !isNaN(Number(state))) {
|
||||||
return getIconFromRange(Number(state), translations.range);
|
return (
|
||||||
|
getIconFromRange(Number(state), translations.range) ??
|
||||||
|
translations.default
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// Fallback to default icon
|
// Fallback to default icon
|
||||||
return translations.default;
|
return translations.default;
|
||||||
@ -518,7 +521,10 @@ export const domainIcon = async (
|
|||||||
}
|
}
|
||||||
// Then check for range-based icons if we have a numeric state
|
// Then check for range-based icons if we have a numeric state
|
||||||
if (state !== undefined && translations.range && !isNaN(Number(state))) {
|
if (state !== undefined && translations.range && !isNaN(Number(state))) {
|
||||||
return getIconFromRange(Number(state), translations.range);
|
return (
|
||||||
|
getIconFromRange(Number(state), translations.range) ??
|
||||||
|
translations.default
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// Fallback to default icon
|
// Fallback to default icon
|
||||||
return translations.default;
|
return translations.default;
|
||||||
|
@ -58,7 +58,7 @@ export class DashboardCard extends LitElement {
|
|||||||
.card-header {
|
.card-header {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
display: block;
|
display: block;
|
||||||
text-align: left;
|
text-align: var(--float-start);
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
.preview {
|
.preview {
|
||||||
|
@ -907,7 +907,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.title h1 {
|
.title h1 {
|
||||||
font-family: Roboto;
|
font-family: var(--ha-font-family-body);
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
@ -938,6 +938,8 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
|
margin-inline-end: 16px;
|
||||||
|
margin-inline-start: initial;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
}
|
}
|
||||||
.logo-container img {
|
.logo-container img {
|
||||||
@ -971,7 +973,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
|||||||
margin-inline-start: 16px;
|
margin-inline-start: 16px;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
font-family: Roboto;
|
font-family: var(--ha-font-family-body);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
@ -82,7 +82,7 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
|||||||
|
|
||||||
const width = entries[0]?.contentRect.width;
|
const width = entries[0]?.contentRect.width;
|
||||||
if (width < 245) {
|
if (width < 245) {
|
||||||
result.height = "very-very-narrow";
|
result.width = "very-very-narrow";
|
||||||
} else if (width < 300) {
|
} else if (width < 300) {
|
||||||
result.width = "very-narrow";
|
result.width = "very-narrow";
|
||||||
} else if (width < 375) {
|
} else if (width < 375) {
|
||||||
@ -93,7 +93,6 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
|||||||
if (height < 235) {
|
if (height < 235) {
|
||||||
result.height = "short";
|
result.height = "short";
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user