diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 6c32d86e4e..880e043c7f 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 90 days stale policy
- uses: actions/stale@v5.1.0
+ uses: actions/stale@v5.1.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 90
diff --git a/pyproject.toml b/pyproject.toml
index 7c8db591ce..2666a9c73f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "home-assistant-frontend"
-version = "20220728.0"
+version = "20220802.0"
license = {text = "Apache-2.0"}
description = "The Home Assistant frontend"
readme = "README.md"
diff --git a/src/components/ha-blueprint-picker.ts b/src/components/ha-blueprint-picker.ts
index 9f8a33cd23..b018d4c768 100644
--- a/src/components/ha-blueprint-picker.ts
+++ b/src/components/ha-blueprint-picker.ts
@@ -1,5 +1,4 @@
import "@material/mwc-list/mwc-list-item";
-import "./ha-select";
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
import { customElement, property } from "lit/decorators";
import memoizeOne from "memoize-one";
@@ -8,6 +7,7 @@ import { stopPropagation } from "../common/dom/stop_propagation";
import { stringCompare } from "../common/string/compare";
import { Blueprint, Blueprints, fetchBlueprints } from "../data/blueprint";
import { HomeAssistant } from "../types";
+import "./ha-select";
@customElement("ha-blueprint-picker")
class HaBluePrintPicker extends LitElement {
@@ -59,11 +59,6 @@ class HaBluePrintPicker extends LitElement {
@selected=${this._blueprintChanged}
@closed=${stopPropagation}
>
-
- ${this.hass.localize(
- "ui.components.blueprint-picker.select_blueprint"
- )}
-
${this._processedBlueprints(this.blueprints).map(
(blueprint) => html`
diff --git a/src/components/ha-form/compute-initial-ha-form-data.ts b/src/components/ha-form/compute-initial-ha-form-data.ts
index b83835ad70..6d24bbe531 100644
--- a/src/components/ha-form/compute-initial-ha-form-data.ts
+++ b/src/components/ha-form/compute-initial-ha-form-data.ts
@@ -6,7 +6,10 @@ export const computeInitialHaFormData = (
): Record => {
const data = {};
schema.forEach((field) => {
- if (field.description?.suggested_value !== undefined) {
+ if (
+ field.description?.suggested_value !== undefined &&
+ field.description?.suggested_value !== null
+ ) {
data[field.name] = field.description.suggested_value;
} else if ("default" in field) {
data[field.name] = field.default;
diff --git a/src/components/ha-form/ha-form-integer.ts b/src/components/ha-form/ha-form-integer.ts
index e71425ba27..3fe7389ab6 100644
--- a/src/components/ha-form/ha-form-integer.ts
+++ b/src/components/ha-form/ha-form-integer.ts
@@ -105,7 +105,8 @@ export class HaFormInteger extends LitElement implements HaFormElement {
}
return (
- this.schema.description?.suggested_value !== undefined ||
+ (this.schema.description?.suggested_value !== undefined &&
+ this.schema.description?.suggested_value !== null) ||
this.schema.default ||
this.schema.valueMin ||
0
diff --git a/src/panels/config/devices/device-detail/ha-device-entities-card.ts b/src/panels/config/devices/device-detail/ha-device-entities-card.ts
index e73d02c0c7..96599b1e5f 100644
--- a/src/panels/config/devices/device-detail/ha-device-entities-card.ts
+++ b/src/panels/config/devices/device-detail/ha-device-entities-card.ts
@@ -11,24 +11,24 @@ import {
} from "lit";
import { customElement, property, state } from "lit/decorators";
import { computeDomain } from "../../../../common/entity/compute_domain";
+import { computeStateName } from "../../../../common/entity/compute_state_name";
import { domainIcon } from "../../../../common/entity/domain_icon";
+import { stripPrefixFromEntityName } from "../../../../common/entity/strip_prefix_from_entity_name";
import "../../../../components/entity/state-badge";
import "../../../../components/ha-card";
import "../../../../components/ha-icon";
-import type { LovelaceRowConfig } from "../../../lovelace/entity-rows/types";
-import type { HomeAssistant } from "../../../../types";
-import type { HuiErrorCard } from "../../../lovelace/cards/hui-error-card";
-import { createRowElement } from "../../../lovelace/create-element/create-row-element";
-import { addEntitiesToLovelaceView } from "../../../lovelace/editor/add-entities-to-view";
-import { LovelaceRow } from "../../../lovelace/entity-rows/types";
-import { showEntityEditorDialog } from "../../entities/show-dialog-entity-editor";
-import { EntityRegistryStateEntry } from "../ha-config-device-page";
-import { computeStateName } from "../../../../common/entity/compute_state_name";
-import { stripPrefixFromEntityName } from "../../../../common/entity/strip_prefix_from_entity_name";
import {
ExtEntityRegistryEntry,
getExtendedEntityRegistryEntry,
} from "../../../../data/entity_registry";
+import type { HomeAssistant } from "../../../../types";
+import type { HuiErrorCard } from "../../../lovelace/cards/hui-error-card";
+import { createRowElement } from "../../../lovelace/create-element/create-row-element";
+import { addEntitiesToLovelaceView } from "../../../lovelace/editor/add-entities-to-view";
+import type { LovelaceRowConfig } from "../../../lovelace/entity-rows/types";
+import { LovelaceRow } from "../../../lovelace/entity-rows/types";
+import { showEntityEditorDialog } from "../../entities/show-dialog-entity-editor";
+import { EntityRegistryStateEntry } from "../ha-config-device-page";
@customElement("ha-device-entities-card")
export class HaDeviceEntitiesCard extends LitElement {
@@ -165,7 +165,7 @@ export class HaDeviceEntitiesCard extends LitElement {
const stateObj = this.hass.states[entry.entity_id];
let name = entry.name
- ? entry.name
+ ? stripPrefixFromEntityName(entry.name, this.deviceName.toLowerCase())
: entry.has_entity_name
? entry.original_name || this.deviceName
: stripPrefixFromEntityName(
diff --git a/src/panels/config/ha-panel-config.ts b/src/panels/config/ha-panel-config.ts
index c910dfdbeb..61687ed80c 100644
--- a/src/panels/config/ha-panel-config.ts
+++ b/src/panels/config/ha-panel-config.ts
@@ -8,7 +8,6 @@ import {
mdiDevices,
mdiInformation,
mdiInformationOutline,
- mdiLifebuoy,
mdiLightningBolt,
mdiMapMarkerRadius,
mdiMathLog,
@@ -19,6 +18,7 @@ import {
mdiPaletteSwatch,
mdiPuzzle,
mdiRobot,
+ mdiScrewdriver,
mdiScriptText,
mdiShape,
mdiSofa,
@@ -270,7 +270,7 @@ export const configSections: { [name: string]: PageNavigation[] } = {
{
path: "/config/repairs",
translationKey: "repairs",
- iconPath: mdiLifebuoy,
+ iconPath: mdiScrewdriver,
iconColor: "#5c995c",
},
{
diff --git a/src/panels/config/helpers/dialog-helper-detail.ts b/src/panels/config/helpers/dialog-helper-detail.ts
index 782c06e792..65daced845 100644
--- a/src/panels/config/helpers/dialog-helper-detail.ts
+++ b/src/panels/config/helpers/dialog-helper-detail.ts
@@ -1,4 +1,5 @@
import "@material/mwc-button/mwc-button";
+import { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item-base";
import "@polymer/paper-item/paper-icon-item";
import "@polymer/paper-tooltip/paper-tooltip";
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
@@ -6,6 +7,7 @@ import { customElement, property, query, state } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
import { dynamicElement } from "../../../common/dom/dynamic-element-directive";
+import { shouldHandleRequestSelectedEvent } from "../../../common/mwc/handle-request-selected-event";
import "../../../components/ha-circular-progress";
import "../../../components/ha-dialog";
import { getConfigFlowHandlers } from "../../../data/config_flow";
@@ -81,11 +83,15 @@ export class DialogHelperDetail extends LitElement {
public closeDialog(): void {
this._opened = false;
- this._error = "";
+ this._error = undefined;
+ this._domain = undefined;
this._params = undefined;
}
protected render(): TemplateResult {
+ if (!this._opened) {
+ return html``;
+ }
let content: TemplateResult;
if (this._domain) {
@@ -189,7 +195,7 @@ export class DialogHelperDetail extends LitElement {
return html`
): void {
+ if (!shouldHandleRequestSelectedEvent(ev)) {
+ return;
+ }
const domain = (ev.currentTarget! as any).domain;
if (domain in HELPERS) {
diff --git a/src/panels/config/repairs/ha-config-repairs-dashboard.ts b/src/panels/config/repairs/ha-config-repairs-dashboard.ts
index 0c837ac7f3..25e853d952 100644
--- a/src/panels/config/repairs/ha-config-repairs-dashboard.ts
+++ b/src/panels/config/repairs/ha-config-repairs-dashboard.ts
@@ -6,6 +6,8 @@ import { customElement, property, state } from "lit/decorators";
import memoizeOne from "memoize-one";
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
import { shouldHandleRequestSelectedEvent } from "../../../common/mwc/handle-request-selected-event";
+import { navigate } from "../../../common/navigate";
+import { extractSearchParam } from "../../../common/url/search-params";
import "../../../components/ha-card";
import "../../../components/ha-check-list-item";
import {
@@ -37,6 +39,17 @@ class HaConfigRepairsDashboard extends SubscribeMixin(LitElement) {
: repairsIssues.filter((issue) => !issue.ignored)
);
+ public connectedCallback(): void {
+ super.connectedCallback();
+
+ const searchParam = extractSearchParam("dialog");
+
+ if (searchParam === "system-health") {
+ navigate("/config/repairs", { replace: true });
+ showSystemInformationDialog(this);
+ }
+ }
+
public hassSubscribe(): UnsubscribeFunc[] {
return [
subscribeRepairsIssueRegistry(this.hass.connection!, (repairs) => {
diff --git a/src/panels/developer-tools/statistics/developer-tools-statistics.ts b/src/panels/developer-tools/statistics/developer-tools-statistics.ts
index c4f8651ac7..2578afc377 100644
--- a/src/panels/developer-tools/statistics/developer-tools-statistics.ts
+++ b/src/panels/developer-tools/statistics/developer-tools-statistics.ts
@@ -281,7 +281,7 @@ class HaPanelDevStatistics extends SubscribeMixin(LitElement) {
});
break;
case "unsupported_state_class":
- showAlertDialog(this, {
+ showConfirmationDialog(this, {
title: "Unsupported state class",
text: html`The state class of this entity, ${issue.data.state_class}
is not supported.
Statistics can not be generated until this
@@ -296,7 +296,15 @@ class HaPanelDevStatistics extends SubscribeMixin(LitElement) {
rel="noreferrer noopener"
>
developer documentation.`,
+ >. If the state class has permanently changed, you may want to
+ remove the long term statistics of it from your database.
Do
+ you want to permanently remove the long term statistics of
+ ${issue.data.statistic_id} from your database?`,
+ confirmText: this.hass.localize("ui.common.remove"),
+ confirm: async () => {
+ await clearStatistics(this.hass, [issue.data.statistic_id]);
+ this._validateStatistics();
+ },
});
break;
case "unsupported_unit_metadata":
diff --git a/src/panels/my/ha-panel-my.ts b/src/panels/my/ha-panel-my.ts
index 122a93c8d9..756d217f30 100644
--- a/src/panels/my/ha-panel-my.ts
+++ b/src/panels/my/ha-panel-my.ts
@@ -157,7 +157,7 @@ export const getMyRedirects = (hasSupervisor: boolean): Redirects => ({
redirect: "/config/info",
},
system_health: {
- redirect: "/config/system_health",
+ redirect: "/config/repairs?dialog=system-health",
},
hardware: {
redirect: "/config/hardware",
diff --git a/src/state-summary/state-card-number.js b/src/state-summary/state-card-number.js
index 3a701d8eae..be4349be64 100644
--- a/src/state-summary/state-card-number.js
+++ b/src/state-summary/state-card-number.js
@@ -30,7 +30,7 @@ class StateCardNumber extends mixinBehaviors(
.sliderstate {
min-width: 45px;
}
- ha-slider[hidden] {
+ [hidden] {
display: none !important;
}
ha-textfield {