Compare commits

...

12 Commits

Author SHA1 Message Date
Paul Bottein
f43319a3ae Bumped version to 20240610.1 2024-06-13 20:49:43 +02:00
Paul Bottein
e8eefaf1d3 Fix current mode not selected in card feature (#21063) 2024-06-13 20:46:50 +02:00
Steve Repsher
06d82a4925 Do not inject Intl polyfill into ecma402-abstract package (#21074) 2024-06-13 20:45:50 +02:00
Paulus Schoutsen
4991d52fcc Hide notify entities from generated dashboard (#21075)
Hide notify entiites from generated dashboard
2024-06-13 20:45:35 +02:00
Simon Lamon
0b391eafcf Fix diagnostic download not downloading (#21078) 2024-06-13 20:45:12 +02:00
Paul Bottein
0bb34830f8 Fix selected state for selected config entries (#21079) 2024-06-13 20:45:02 +02:00
Bram Kragten
4a8bb5034d Merge branch 'dev' 2024-06-10 19:50:24 +02:00
Bram Kragten
a8366c6416 Merge branch 'dev' 2024-06-05 11:42:10 +02:00
Bram Kragten
8ff8c01bba Merge branch 'dev' 2024-06-04 16:47:15 +02:00
Bram Kragten
52f3ff3306 20240603.0 (#20974) 2024-06-03 18:56:01 +02:00
Bram Kragten
10a5c4dfb4 20240530.0 (#20925) 2024-05-30 16:27:39 +02:00
Bram Kragten
1a2daf8a7a 20240529.0 (#20901) 2024-05-29 18:27:40 +02:00
6 changed files with 28 additions and 43 deletions

View File

@@ -157,7 +157,7 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
exclude: [
path.join(paths.polymer_dir, "src/resources/polyfills"),
...[
"@formatjs/intl-\\w+",
"@formatjs/(?:ecma402-abstract|intl-\\w+)",
"@lit-labs/virtualizer/polyfills",
"@webcomponents/scoped-custom-element-registry",
"element-internals-polyfill",

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "home-assistant-frontend"
version = "20240610.0"
version = "20240610.1"
license = {text = "Apache-2.0"}
description = "The Home Assistant frontend"
readme = "README.md"

View File

@@ -754,7 +754,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
${item.disabled_by && devices.length
? html`
<ha-menu-item
.href=${devices.length === 1
href=${devices.length === 1
? `/config/devices/device/${devices[0].id}`
: `/config/devices/dashboard?historyBack=1&config_entry=${item.entry_id}`}
>
@@ -769,7 +769,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
: ""}
${item.disabled_by && services.length
? html`<ha-menu-item
.href=${services.length === 1
href=${services.length === 1
? `/config/devices/device/${services[0].id}`
: `/config/devices/dashboard?historyBack=1&config_entry=${item.entry_id}`}
>
@@ -787,7 +787,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
${item.disabled_by && entities.length
? html`
<ha-menu-item
.href=${`/config/entities?historyBack=1&config_entry=${item.entry_id}`}
href=${`/config/entities?historyBack=1&config_entry=${item.entry_id}`}
>
<ha-svg-icon
.path=${mdiShapeOutline}
@@ -827,7 +827,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
${this._diagnosticHandler && item.state === "loaded"
? html`
<ha-menu-item
.href=${getConfigEntryDiagnosticsDownloadUrl(item.entry_id)}
href=${getConfigEntryDiagnosticsDownloadUrl(item.entry_id)}
target="_blank"
@click=${this._signUrl}
>
@@ -1414,14 +1414,17 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
ha-alert:first-of-type {
margin-top: 16px;
}
ha-list-item-new {
position: relative;
}
ha-list-item-new.discovered {
height: 72px;
}
ha-list-item-new.config_entry::after {
position: absolute;
top: 8px;
top: 0;
right: 0;
bottom: 8px;
bottom: 0;
left: 0;
opacity: 0.12;
pointer-events: none;

View File

@@ -1,7 +1,7 @@
export const filterModes = (
supportedModes: string[] | undefined,
selectedModes: string[] | undefined
): string[] =>
export const filterModes = <T extends string = string>(
supportedModes: T[] | undefined,
selectedModes: T[] | undefined
): T[] =>
selectedModes
? selectedModes.filter((mode) => (supportedModes || []).includes(mode))
: supportedModes || [];

View File

@@ -6,7 +6,6 @@ import { styleMap } from "lit/directives/style-map";
import memoizeOne from "memoize-one";
import { computeDomain } from "../../../common/entity/compute_domain";
import { stateColorCss } from "../../../common/entity/state_color";
import { supportsFeature } from "../../../common/entity/supports-feature";
import "../../../components/ha-control-button";
import "../../../components/ha-control-button-group";
import "../../../components/ha-control-select";
@@ -70,37 +69,18 @@ class HuiAlarmModeCardFeature
}
}
private _modes = memoizeOne(
(
stateObj: AlarmControlPanelEntity,
selectedModes: AlarmMode[] | undefined
) => {
if (!selectedModes) {
return [];
}
return (Object.keys(ALARM_MODES) as AlarmMode[]).filter((mode) => {
const feature = ALARM_MODES[mode].feature;
return (
(!feature || supportsFeature(stateObj, feature)) &&
selectedModes.includes(mode)
);
});
}
);
private _getCurrentMode(stateObj: AlarmControlPanelEntity) {
return this._modes(stateObj, this._config?.modes).find(
(mode) => mode === stateObj.state
);
}
private _getCurrentMode = memoizeOne((stateObj: AlarmControlPanelEntity) => {
const supportedModes = supportedAlarmModes(stateObj);
return supportedModes.find((mode) => mode === stateObj.state);
});
private async _valueChanged(ev: CustomEvent) {
if (!this.stateObj) return;
const mode = (ev.detail as any).value as AlarmMode;
if (mode === this.stateObj!.state) return;
if (mode === this.stateObj.state) return;
const oldMode = this._getCurrentMode(this.stateObj!);
const oldMode = this._getCurrentMode(this.stateObj);
this._currentMode = mode;
try {
@@ -153,6 +133,7 @@ class HuiAlarmModeCardFeature
</ha-control-button-group>
`;
}
return html`
<div class="container">
<ha-control-select

View File

@@ -37,15 +37,16 @@ const HIDE_DOMAIN = new Set([
"configurator",
"conversation",
"device_tracker",
"event",
"geo_location",
"notify",
"persistent_notification",
"script",
"sun",
"zone",
"event",
"tts",
"stt",
"sun",
"todo",
"tts",
"zone",
]);
const HIDE_PLATFORM = new Set(["mobile_app"]);