From 522f66423bdcab7482cd46b7fda85028383ec879 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 3 Jul 2024 15:26:19 +0200 Subject: [PATCH 01/18] Fix demo map panel (#21265) --- demo/src/stubs/entities.ts | 50 ++++++++++++++++++++++++++++++++++++ demo/src/stubs/lovelace.ts | 17 +++++++++--- src/fake_data/demo_panels.ts | 4 +-- 3 files changed, 65 insertions(+), 6 deletions(-) diff --git a/demo/src/stubs/entities.ts b/demo/src/stubs/entities.ts index 132515a014ad..8c863f9a3bb6 100644 --- a/demo/src/stubs/entities.ts +++ b/demo/src/stubs/entities.ts @@ -1,5 +1,55 @@ import { convertEntities } from "../../../src/fake_data/entity"; +export const mapEntities = () => + convertEntities({ + "zone.home": { + entity_id: "zone.home", + state: "zoning", + attributes: { + hidden: true, + latitude: 52.3631339, + longitude: 4.8903147, + radius: 200, + friendly_name: "Home", + icon: "hademo:home", + }, + }, + "zone.uva": { + entity_id: "zone.buckhead", + state: "zoning", + attributes: { + hidden: true, + radius: 400, + friendly_name: "UvA", + icon: "hademo:school", + latitude: 52.3558182, + longitude: 4.9535376, + }, + }, + "person.arsaboo": { + entity_id: "person.arsaboo", + state: "not_home", + attributes: { + radius: 50, + friendly_name: "Arsaboo", + latitude: 52.3579946, + longitude: 4.8664597, + entity_picture: "/assets/arsaboo/images/arsaboo.jpg", + }, + }, + "person.melody": { + entity_id: "person.melody", + state: "not_home", + attributes: { + radius: 50, + friendly_name: "Melody", + latitude: 52.3408927, + longitude: 4.8711073, + entity_picture: "/assets/arsaboo/images/melody.jpg", + }, + }, + }); + export const energyEntities = () => convertEntities({ "sensor.grid_fossil_fuel_percentage": { diff --git a/demo/src/stubs/lovelace.ts b/demo/src/stubs/lovelace.ts index 6896de37ef09..8712f51a66a2 100644 --- a/demo/src/stubs/lovelace.ts +++ b/demo/src/stubs/lovelace.ts @@ -7,16 +7,25 @@ import { } from "../configs/demo-configs"; import "../custom-cards/cast-demo-row"; import "../custom-cards/ha-demo-card"; +import { mapEntities } from "./entities"; export const mockLovelace = ( hass: MockHomeAssistant, localizePromise: Promise ) => { - hass.mockWS("lovelace/config", () => - Promise.all([selectedDemoConfig, localizePromise]).then( + hass.mockWS("lovelace/config", ({ url_path }) => { + if (url_path === "map") { + hass.addEntities(mapEntities()); + return { + strategy: { + type: "map", + }, + }; + } + return Promise.all([selectedDemoConfig, localizePromise]).then( ([config, localize]) => config.lovelace(localize) - ) - ); + ); + }); hass.mockWS("lovelace/config/save", () => Promise.resolve()); hass.mockWS("lovelace/resources", () => Promise.resolve([])); diff --git a/src/fake_data/demo_panels.ts b/src/fake_data/demo_panels.ts index 319aa4997827..dbf70b4b1df8 100644 --- a/src/fake_data/demo_panels.ts +++ b/src/fake_data/demo_panels.ts @@ -66,10 +66,10 @@ export const demoPanels: Panels = { // url_path: "history", // }, map: { - component_name: "map", + component_name: "lovelace", icon: "hass:tooltip-account", title: "map", - config: null, + config: { mode: "storage" }, url_path: "map", }, energy: { From 97c4cf9391955fc1a066546575aeb3f6b082e9b0 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 3 Jul 2024 15:33:00 +0200 Subject: [PATCH 02/18] Hide some things in demo (#21268) --- .../more-info/controls/more-info-media_player.ts | 3 ++- src/dialogs/more-info/ha-more-info-dialog.ts | 2 +- src/dialogs/more-info/ha-more-info-history.ts | 12 +++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/dialogs/more-info/controls/more-info-media_player.ts b/src/dialogs/more-info/controls/more-info-media_player.ts index 1cd8c228120d..34971e593ba0 100644 --- a/src/dialogs/more-info/controls/more-info-media_player.ts +++ b/src/dialogs/more-info/controls/more-info-media_player.ts @@ -63,7 +63,8 @@ class MoreInfoMediaPlayer extends LitElement { ` )} - ${!isUnavailableState(stateObj.state) && + ${!__DEMO__ && + !isUnavailableState(stateObj.state) && supportsFeature(stateObj, MediaPlayerEntityFeature.BROWSE_MEDIA) ? html` ` : nothing} - ${isAdmin + ${!__DEMO__ && isAdmin ? html` ${this.hass.localize("ui.dialogs.more_info_control.history")} - ${this.hass.localize( - "ui.dialogs.more_info_control.show_more" - )} + ${__DEMO__ + ? nothing + : html`${this.hass.localize( + "ui.dialogs.more_info_control.show_more" + )}`} ${this._error ? html`
${this._error}
` From e332364ec0f445ade3b73f4de3388460a69093cb Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 3 Jul 2024 08:56:44 -0700 Subject: [PATCH 03/18] Fix automation picker overflow menu for keyboard (#21048) * Fix automation picker overflow menu for keyboard * some updates from review * typing * no removeEventListener * updates from review --- src/components/ha-menu-item.ts | 4 +- src/components/ha-menu.ts | 25 +++++++ .../config/automation/ha-automation-picker.ts | 73 +++++++++++-------- 3 files changed, 69 insertions(+), 33 deletions(-) diff --git a/src/components/ha-menu-item.ts b/src/components/ha-menu-item.ts index b6b133c68115..2f2914859640 100644 --- a/src/components/ha-menu-item.ts +++ b/src/components/ha-menu-item.ts @@ -1,9 +1,11 @@ import { MdMenuItem } from "@material/web/menu/menu-item"; import { css } from "lit"; -import { customElement } from "lit/decorators"; +import { customElement, property } from "lit/decorators"; @customElement("ha-menu-item") export class HaMenuItem extends MdMenuItem { + @property({ attribute: false }) clickAction?: (item?: HTMLElement) => void; + static override styles = [ ...super.styles, css` diff --git a/src/components/ha-menu.ts b/src/components/ha-menu.ts index 06c2d5f91def..06e1de186329 100644 --- a/src/components/ha-menu.ts +++ b/src/components/ha-menu.ts @@ -1,9 +1,30 @@ import { MdMenu } from "@material/web/menu/menu"; +import type { CloseMenuEvent } from "@material/web/menu/menu"; +import { + CloseReason, + KeydownCloseKey, +} from "@material/web/menu/internal/controllers/shared"; import { css } from "lit"; import { customElement } from "lit/decorators"; +import type { HaMenuItem } from "./ha-menu-item"; @customElement("ha-menu") export class HaMenu extends MdMenu { + connectedCallback(): void { + super.connectedCallback(); + this.addEventListener("close-menu", this._handleCloseMenu); + } + + private _handleCloseMenu(ev: CloseMenuEvent) { + if ( + ev.detail.reason.kind === CloseReason.KEYDOWN && + ev.detail.reason.key === KeydownCloseKey.ESCAPE + ) { + return; + } + (ev.detail.initiator as HaMenuItem).clickAction?.(ev.detail.initiator); + } + static override styles = [ ...super.styles, css` @@ -18,4 +39,8 @@ declare global { interface HTMLElementTagNameMap { "ha-menu": HaMenu; } + + interface HTMLElementEventMap { + "close-menu": CloseMenuEvent; + } } diff --git a/src/panels/config/automation/ha-automation-picker.ts b/src/panels/config/automation/ha-automation-picker.ts index 3c0f0d10df8c..7bef54309e4b 100644 --- a/src/panels/config/automation/ha-automation-picker.ts +++ b/src/panels/config/automation/ha-automation-picker.ts @@ -68,6 +68,7 @@ import "../../../components/ha-icon-overflow-menu"; import "../../../components/ha-menu"; import type { HaMenu } from "../../../components/ha-menu"; import "../../../components/ha-menu-item"; +import type { HaMenuItem } from "../../../components/ha-menu-item"; import "../../../components/ha-sub-menu"; import "../../../components/ha-svg-icon"; import { createAreaRegistryEntry } from "../../../data/area_registry"; @@ -826,7 +827,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) { - + - +
${this.hass.localize( @@ -844,7 +845,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) { )}
- +
${this.hass.localize( @@ -852,13 +853,13 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) { )}
- +
${this.hass.localize("ui.panel.config.automation.editor.run")}
- +
${this.hass.localize( @@ -867,13 +868,13 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
- +
${this.hass.localize("ui.panel.config.automation.picker.duplicate")}
- + - +
${this.hass.localize("ui.panel.config.automation.picker.delete")} @@ -1055,28 +1056,32 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) { this._applyFilters(); } - private _showInfo(ev) { - const automation = ev.currentTarget.parentElement.anchorElement.automation; + private _showInfo = (item: HaMenuItem) => { + const automation = ((item.parentElement as HaMenu)!.anchorElement as any)! + .automation; fireEvent(this, "hass-more-info", { entityId: automation.entity_id }); - } + }; - private _showSettings(ev) { - const automation = ev.currentTarget.parentElement.anchorElement.automation; + private _showSettings = (item: HaMenuItem) => { + const automation = ((item.parentElement as HaMenu)!.anchorElement as any)! + .automation; fireEvent(this, "hass-more-info", { entityId: automation.entity_id, view: "settings", }); - } + }; - private _runActions(ev) { - const automation = ev.currentTarget.parentElement.anchorElement.automation; + private _runActions = (item: HaMenuItem) => { + const automation = ((item.parentElement as HaMenu)!.anchorElement as any)! + .automation; triggerAutomationActions(this.hass, automation.entity_id); - } + }; - private _editCategory(ev) { - const automation = ev.currentTarget.parentElement.anchorElement.automation; + private _editCategory = (item: HaMenuItem) => { + const automation = ((item.parentElement as HaMenu)!.anchorElement as any)! + .automation; const entityReg = this._entityReg.find( (reg) => reg.entity_id === automation.entity_id @@ -1096,10 +1101,11 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) { scope: "automation", entityReg, }); - } + }; - private _showTrace(ev) { - const automation = ev.currentTarget.parentElement.anchorElement.automation; + private _showTrace = (item: HaMenuItem) => { + const automation = ((item.parentElement as HaMenu)!.anchorElement as any)! + .automation; if (!automation.attributes.id) { showAlertDialog(this, { @@ -1112,19 +1118,21 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) { navigate( `/config/automation/trace/${encodeURIComponent(automation.attributes.id)}` ); - } + }; - private async _toggle(ev): Promise { - const automation = ev.currentTarget.parentElement.anchorElement.automation; + private _toggle = async (item: HaMenuItem): Promise => { + const automation = ((item.parentElement as HaMenu)!.anchorElement as any)! + .automation; const service = automation.state === "off" ? "turn_on" : "turn_off"; await this.hass.callService("automation", service, { entity_id: automation.entity_id, }); - } + }; - private async _deleteConfirm(ev) { - const automation = ev.currentTarget.parentElement.anchorElement.automation; + private _deleteConfirm = async (item: HaMenuItem) => { + const automation = ((item.parentElement as HaMenu)!.anchorElement as any)! + .automation; showConfirmationDialog(this, { title: this.hass.localize( @@ -1139,7 +1147,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) { confirm: () => this._delete(automation), destructive: true, }); - } + }; private async _delete(automation) { try { @@ -1159,8 +1167,9 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) { } } - private async _duplicate(ev) { - const automation = ev.currentTarget.parentElement.anchorElement.automation; + private _duplicate = async (item: HaMenuItem) => { + const automation = ((item.parentElement as HaMenu)!.anchorElement as any)! + .automation; try { const config = await fetchAutomationFileConfig( @@ -1184,7 +1193,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) { ), }); } - } + }; private _showHelp() { showAlertDialog(this, { From 1ceef7c3d33547ef4805f7f40d3e324d37c17192 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 3 Jul 2024 22:32:56 +0200 Subject: [PATCH 04/18] Set min column size to 1 for vertical tile card (#21275) --- src/panels/lovelace/cards/hui-tile-card.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/panels/lovelace/cards/hui-tile-card.ts b/src/panels/lovelace/cards/hui-tile-card.ts index 19a05e3bb4ab..ae8c8a99c0b8 100644 --- a/src/panels/lovelace/cards/hui-tile-card.ts +++ b/src/panels/lovelace/cards/hui-tile-card.ts @@ -123,19 +123,21 @@ export class HuiTileCard extends LitElement implements LovelaceCard { public getLayoutOptions(): LovelaceLayoutOptions { const grid_columns = 2; + let grid_min_columns = 2; let grid_rows = 1; if (this._config?.features?.length) { const featureHeight = Math.ceil((this._config.features.length * 2) / 3); grid_rows += featureHeight; } if (this._config?.vertical) { - grid_rows!++; + grid_rows++; + grid_min_columns = 1; } return { grid_columns, grid_rows, grid_min_rows: grid_rows, - grid_min_columns: grid_columns, + grid_min_columns, }; } From c07e1122e156ee72a5bf2ed0267feb7863058f60 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 4 Jul 2024 08:11:39 +0200 Subject: [PATCH 05/18] Tweak demo, add some translations, tweak media players (#21271) Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../images/media_player_family_room.jpg | Bin 0 -> 30519 bytes demo/src/configs/sections/entities.ts | 74 ++++++++++++++++-- demo/src/configs/sections/lovelace.ts | 21 +++-- .../controls/more-info-media_player.ts | 3 +- src/translations/en.json | 19 ++++- 5 files changed, 94 insertions(+), 23 deletions(-) create mode 100644 demo/public/assets/sections/images/media_player_family_room.jpg diff --git a/demo/public/assets/sections/images/media_player_family_room.jpg b/demo/public/assets/sections/images/media_player_family_room.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e73833aa305179403ee04bfd0c4762195740ae80 GIT binary patch literal 30519 zcmb5Vb95#_^EQ0Pwl=nH+sVeb<7{ke<7{l(wryjH?&zYVxHCK1l z%ygf=s%yTMzqSF$G7{1f01yxW0OY#>zSaPu09Ys}7$`_s7-$$cI9PZjY-A)vL?i-C zEL3bVA_{U+B2p46dTu5v8V*_#QWh~54qkpCAt4GT30ZLg8E!!#{{J)r0tW|&gn)#P zjEv7uO-jxG|14jB0VvQQu^_QvASeJ(6c8{Jkgov%-nWsUU?Bgo_rC=k0u&4q1Pc0F zi~Fqr0eq|fTlei1C>S^dB-Ga`03PfciVTMQtvmN+ekJ;@(Zzogw~nt~gAnw2)gqYy zLrRiq*Jmk0RsS2Wd|31EeDGlNC5pG>hU40l&@48MF^(}LM&c=iK4WR;&*a2BV{wJ+ zE?L5G7GATjLbyH4xwOc^!hh4c>PFYl%x@LjI;re>f5Q^E{zKkCL0D;JO{QgP0 zdTKE{9NG}zrTeNb~W#I?nKY_GXvuy_zON_1zoeBqTnjB)0YJh9uO{30mttB}|&S^Mn* zrscWOUC*%|p~ayqv6E5S<&Ag1VaI&egor{C#}w z)I}Fj>r!*=_eW0BcSDz326Gx2@1CdWPS*xws! z?_Nk9Wx6$0mj8C-(B=d_w0|CW&mX+C^m>YJe*toTw`6%cd2jMYSMOc16dk^K`R4Zs zJofN^JjKkouoGI^n!b;JHt*aWLKaT(dl&3{L_Tw#fA1 zw-gL|@@sT17ai@Lw0m{7_(mLeW7!>k9;s9x-!3`I-wj^MZ}+ghBE~2kJ^s4gO=%f? zV)TDp&iyt3f-YcV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y`=l=g72J>6hlqXrskBNGOky8aF*3{UMe<;GAK*Mm znPXDu`|Mqp(V9p69ZKi6iYRDEuF5E`O&aI;I+*ZnWp%!<;AWPR{tl(ko%{>nQ)rH% zp=u(nqY^pd#WgOZIjmX~;S>TU#1KqFC^@G*OdYPWQ&st*CNfXND+WIyw+vxhFH$~Z97i|nn zvdzs4JdaVa$(z{b$71-`Wp#ZT5o6?`iH(b;i>euY7i|d@(frG{y5CkNUt;gBiS@45 zE|gHZF?C|^V)!U)rHi%vFXBV`E2|>L`lMfK_>vkdU5}$Ep`yNuLqZ!bqZh+NeG)8v zE3x&m`XT(wrI*p6BK{;XF00~fOX;*BiS)0Ai!8py$z5-&WeI!~SH{FNS4$U5>blu~ d1^tKF;9?pmL+o9Z(w}V=_8(sdo`|x~|Jj-~t8D-P literal 0 HcmV?d00001 diff --git a/demo/src/configs/sections/entities.ts b/demo/src/configs/sections/entities.ts index 1900624b8304..1bdb06f8a9ad 100644 --- a/demo/src/configs/sections/entities.ts +++ b/demo/src/configs/sections/entities.ts @@ -1,7 +1,7 @@ import { convertEntities } from "../../../../src/fake_data/entity"; import { DemoConfig } from "../types"; -export const demoEntitiesSections: DemoConfig["entities"] = () => +export const demoEntitiesSections: DemoConfig["entities"] = (localize) => convertEntities({ "cover.living_room_garden_shutter": { entity_id: "cover.living_room_garden_shutter", @@ -113,11 +113,30 @@ export const demoEntitiesSections: DemoConfig["entities"] = () => }, "media_player.living_room_nest_mini": { entity_id: "media_player.living_room_nest_mini", - state: "off", + state: "on", attributes: { device_class: "speaker", - friendly_name: "Living room Nest Mini", - supported_features: 152461, + volume_level: 0.18, + is_volume_muted: false, + media_content_type: "music", + media_duration: 300, + media_position: 0, + media_position_updated_at: new Date( + // 23 seconds in + new Date().getTime() - 23000 + ).toISOString(), + media_title: "I Wasn't Born To Follow", + media_artist: "The Byrds", + media_album_name: "The Notorious Byrd Brothers", + source_list: ["It's A Party", "Radio HSL", "Retro 70s and 80s"], + shuffle: false, + night_sound: false, + speech_enhance: false, + friendly_name: localize( + "ui.panel.page-demo.config.sections.entities.media_player.living_room_nest_mini" + ), + entity_picture: "/assets/sections/images/media_player_family_room.jpg", + supported_features: 64063, }, }, "cover.kitchen_shutter": { @@ -168,8 +187,27 @@ export const demoEntitiesSections: DemoConfig["entities"] = () => state: "on", attributes: { device_class: "speaker", - friendly_name: "Kitchen Nest Audio", - supported_features: 152461, + volume_level: 0.18, + is_volume_muted: false, + media_content_type: "music", + media_duration: 300, + media_position: 0, + media_position_updated_at: new Date( + // 23 seconds in + new Date().getTime() - 23000 + ).toISOString(), + media_title: "I Wasn't Born To Follow", + media_artist: "The Byrds", + media_album_name: "The Notorious Byrd Brothers", + source_list: ["It's A Party", "Radio HSL", "Retro 70s and 80s"], + shuffle: false, + night_sound: false, + speech_enhance: false, + friendly_name: localize( + "ui.panel.page-demo.config.sections.entities.media_player.kitchen_nest_audio" + ), + entity_picture: "/assets/sections/images/media_player_family_room.jpg", + supported_features: 64063, }, }, "binary_sensor.tesla_wall_connector_vehicle_connected": { @@ -333,8 +371,28 @@ export const demoEntitiesSections: DemoConfig["entities"] = () => entity_id: "media_player.study_nest_hub", state: "off", attributes: { - friendly_name: "Study Nest Hub", - supported_features: 152461, + device_class: "speaker", + volume_level: 0.18, + is_volume_muted: false, + media_content_type: "music", + media_duration: 300, + media_position: 0, + media_position_updated_at: new Date( + // 23 seconds in + new Date().getTime() - 23000 + ).toISOString(), + media_title: "I Wasn't Born To Follow", + media_artist: "The Byrds", + media_album_name: "The Notorious Byrd Brothers", + source_list: ["It's A Party", "Radio HSL", "Retro 70s and 80s"], + shuffle: false, + night_sound: false, + speech_enhance: false, + friendly_name: localize( + "ui.panel.page-demo.config.sections.entities.media_player.study_nest_hub" + ), + entity_picture: "/assets/sections/images/media_player_family_room.jpg", + supported_features: 64063, }, }, "sensor.standing_desk_height": { diff --git a/demo/src/configs/sections/lovelace.ts b/demo/src/configs/sections/lovelace.ts index 36b4abb2fe9c..f09c0595c6da 100644 --- a/demo/src/configs/sections/lovelace.ts +++ b/demo/src/configs/sections/lovelace.ts @@ -1,7 +1,7 @@ import { isFrontpageEmbed } from "../../util/is_frontpage"; import { DemoConfig } from "../types"; -export const demoLovelaceSections: DemoConfig["lovelace"] = () => ({ +export const demoLovelaceSections: DemoConfig["lovelace"] = (localize) => ({ title: "Home Assistant Demo", views: [ { @@ -14,7 +14,7 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = () => ({ ? [] : [ { - title: "Welcome 👋", + title: `${localize("ui.panel.page-demo.config.sections.titles.welcome")} 👋`, cards: [{ type: "custom:ha-demo-card" }], }, ]), @@ -53,10 +53,9 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = () => ({ { type: "tile", entity: "media_player.living_room_nest_mini", - name: "Nest Mini", }, ], - title: "🛋️ Living room ", + title: `🛋️ ${localize("ui.panel.page-demo.config.sections.titles.living_room")} `, }, { type: "grid", @@ -89,10 +88,9 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = () => ({ { type: "tile", entity: "media_player.kitchen_nest_audio", - name: "Nest Audio", }, ], - title: "👩‍🍳 Kitchen", + title: `👩‍🍳 ${localize("ui.panel.page-demo.config.sections.titles.kitchen")}`, }, { type: "grid", @@ -134,7 +132,7 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = () => ({ color: "dark-grey", }, ], - title: "⚡️ Energy", + title: `⚡️ ${localize("ui.panel.page-demo.config.sections.titles.energy")}`, }, { type: "grid", @@ -171,7 +169,7 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = () => ({ state_content: ["preset_mode", "current_temperature"], }, ], - title: "🌤️ Climate", + title: `🌤️ ${localize("ui.panel.page-demo.config.sections.titles.climate")}`, }, { type: "grid", @@ -189,7 +187,6 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = () => ({ { type: "tile", entity: "media_player.study_nest_hub", - name: "Nest Hub", }, { type: "tile", @@ -199,7 +196,7 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = () => ({ icon: "mdi:desk", }, ], - title: "🧑‍💻 Study", + title: `🧑‍💻 ${localize("ui.panel.page-demo.config.sections.titles.study")}`, }, { type: "grid", @@ -233,7 +230,7 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = () => ({ name: "Illuminance", }, ], - title: "🌳 Outdoor", + title: `🌳 ${localize("ui.panel.page-demo.config.sections.titles.outdoor")}`, }, { type: "grid", @@ -263,7 +260,7 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = () => ({ icon: "mdi:home-assistant", }, ], - title: "🎉 Updates", + title: `🎉 ${localize("ui.panel.page-demo.config.sections.titles.updates")}`, }, ], }, diff --git a/src/dialogs/more-info/controls/more-info-media_player.ts b/src/dialogs/more-info/controls/more-info-media_player.ts index 34971e593ba0..1cd8c228120d 100644 --- a/src/dialogs/more-info/controls/more-info-media_player.ts +++ b/src/dialogs/more-info/controls/more-info-media_player.ts @@ -63,8 +63,7 @@ class MoreInfoMediaPlayer extends LitElement { ` )}
- ${!__DEMO__ && - !isUnavailableState(stateObj.state) && + ${!isUnavailableState(stateObj.state) && supportsFeature(stateObj, MediaPlayerEntityFeature.BROWSE_MEDIA) ? html` Date: Thu, 4 Jul 2024 04:01:01 -0400 Subject: [PATCH 06/18] Clean up imports and unopened tag on device config page (#21274) --- .../config/devices/ha-config-device-page.ts | 462 ++++++++---------- 1 file changed, 212 insertions(+), 250 deletions(-) diff --git a/src/panels/config/devices/ha-config-device-page.ts b/src/panels/config/devices/ha-config-device-page.ts index 7b3849ec665a..1a9809b9b68a 100644 --- a/src/panels/config/devices/ha-config-device-page.ts +++ b/src/panels/config/devices/ha-config-device-page.ts @@ -1,6 +1,5 @@ import { consume } from "@lit-labs/context"; import "@lrnwebcomponents/simple-tooltip/simple-tooltip"; -import "@material/mwc-list/mwc-list-item"; import { mdiCog, mdiDelete, @@ -10,8 +9,6 @@ import { mdiPencil, mdiPlusCircle, } from "@mdi/js"; -import "@polymer/paper-item/paper-item"; -import "@polymer/paper-item/paper-item-body"; import { CSSResultGroup, LitElement, @@ -24,7 +21,7 @@ import { customElement, property, state } from "lit/decorators"; import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; -import { SENSOR_ENTITIES, ASSIST_ENTITIES } from "../../../common/const"; +import { ASSIST_ENTITIES, SENSOR_ENTITIES } from "../../../common/const"; import { computeDomain } from "../../../common/entity/compute_domain"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { computeStateName } from "../../../common/entity/compute_state_name"; @@ -77,7 +74,6 @@ import type { HomeAssistant } from "../../../types"; import { brandsUrl } from "../../../util/brands-url"; import { fileDownload } from "../../../util/file_download"; import "../../logbook/ha-logbook"; -import "../ha-config-section"; import "./device-detail/ha-device-entities-card"; import "./device-detail/ha-device-info-card"; import "./device-detail/ha-device-via-devices-card"; @@ -665,269 +661,235 @@ export class HaConfigDevicePage extends LitElement { ` : ""; - return html` - - - + +
+
+ ${area + ? html`` + : ""} +
+ ${battery && + (batteryDomain === "binary_sensor" || !isNaN(battery.state as any)) + ? html` +
+ ${batteryDomain === "sensor" + ? this.hass.formatEntityState(battery) + : nothing} + +
+ ` + : ""} + ${integrations.length + ? html` + ${domainToName( + ` + : ""} +
+
+
+ ${this._deviceAlerts?.length + ? html` +
+ ${this._deviceAlerts.map( + (alert) => html` + + ${alert.text} + + ` )} - > -
-
- ${ - area - ? html`` - : "" - } -
- ${ - battery && - (batteryDomain === "binary_sensor" || - !isNaN(battery.state as any)) - ? html` -
- ${batteryDomain === "sensor" - ? this.hass.formatEntityState(battery) - : nothing} - -
- ` - : "" - } - ${ - integrations.length - ? html` - ${domainToName( - ` - : "" - } -
-
-
- ${ - this._deviceAlerts?.length - ? html` -
- ${this._deviceAlerts.map( - (alert) => html` - - ${alert.text} - - ` + ` + : ""} + + ${deviceInfo} + ${firstDeviceAction || actions.length + ? html` +
+
+ - ` - : "" - } - - ${deviceInfo} - ${ - firstDeviceAction || actions.length - ? html` -
- + + ${actions.length + ? html` + + + ${actions.map((deviceAction) => { + const listItem = html` - ${firstDeviceAction!.label} - ${firstDeviceAction!.icon + ${deviceAction.label} + ${deviceAction.icon ? html` ` : ""} - ${firstDeviceAction!.trailingIcon + ${deviceAction.trailingIcon ? html` ` : ""} - - -
- - ${actions.length - ? html` - - `; + return deviceAction.href + ? html` - ${actions.map((deviceAction) => { - const listItem = html` - ${deviceAction.label} - ${deviceAction.icon - ? html` - - ` - : ""} - ${deviceAction.trailingIcon - ? html` - - ` - : ""} - `; - return deviceAction.href - ? html`${listItem} - ` - : listItem; - })} - - ` - : ""} -
- ` - : "" - } - - ${!this.narrow ? [automationCard, sceneCard, scriptCard] : ""} -
-
- ${( - [ - "control", - "sensor", - "notify", - "event", - "assist", - "config", - "diagnostic", - ] as const - ).map((category) => - // Make sure we render controls if no other cards will be rendered - entitiesByCategory[category].length > 0 || - (entities.length === 0 && category === "control") - ? html` - - - ` - : "" - )} - -
-
- ${this.narrow ? [automationCard, sceneCard, scriptCard] : ""} - ${ - isComponentLoaded(this.hass, "logbook") - ? html` - -

- ${this.hass.localize("panel.logbook")} -

- -
- ` - : "" - } -
-
- - `; + >${listItem} + ` + : listItem; + })} + + ` + : ""} +
+ ` + : ""} + + ${!this.narrow ? [automationCard, sceneCard, scriptCard] : ""} +
+
+ ${( + [ + "control", + "sensor", + "notify", + "event", + "assist", + "config", + "diagnostic", + ] as const + ).map((category) => + // Make sure we render controls if no other cards will be rendered + entitiesByCategory[category].length > 0 || + (entities.length === 0 && category === "control") + ? html` + + + ` + : "" + )} + +
+
+ ${this.narrow ? [automationCard, sceneCard, scriptCard] : ""} + ${isComponentLoaded(this.hass, "logbook") + ? html` + +

+ ${this.hass.localize("panel.logbook")} +

+ +
+ ` + : ""} +
+
+ `; } private async _getDiagnosticButtons(requestId: number): Promise { From df7b5b08cf25f86beb013661a3ebd1648358a830 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 4 Jul 2024 11:46:10 +0200 Subject: [PATCH 07/18] Allow custom localize function for datatable (#21270) --- src/components/data-table/ha-data-table.ts | 11 +++++++++-- src/layouts/hass-tabs-subpage-data-table.ts | 8 ++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/components/data-table/ha-data-table.ts b/src/components/data-table/ha-data-table.ts index bd1507e2eee0..1819256bab0c 100644 --- a/src/components/data-table/ha-data-table.ts +++ b/src/components/data-table/ha-data-table.ts @@ -34,6 +34,7 @@ import type { HaCheckbox } from "../ha-checkbox"; import "../ha-svg-icon"; import "../search-input"; import { filterData, sortData } from "./sort-filter"; +import { LocalizeFunc } from "../../common/translations/localize"; export interface RowClickedEvent { id: string; @@ -110,6 +111,8 @@ const UNDEFINED_GROUP_KEY = "zzzzz_undefined"; export class HaDataTable extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; + @property({ attribute: false }) public localizeFunc?: LocalizeFunc; + @property({ type: Boolean }) public narrow = false; @property({ type: Object }) public columns: DataTableColumnContainer = {}; @@ -317,6 +320,8 @@ export class HaDataTable extends LitElement { ); protected render() { + const localize = this.localizeFunc || this.hass.localize; + const columns = this._sortedColumns(this.columns, this.columnOrder); const renderRow = (row: DataTableRowData, index: number) => @@ -436,7 +441,7 @@ export class HaDataTable extends LitElement {
${this.noDataText || - this.hass.localize("ui.components.data-table.no-data")} + localize("ui.components.data-table.no-data")}
@@ -619,6 +624,8 @@ export class HaDataTable extends LitElement { return; } + const localize = this.localizeFunc || this.hass.localize; + if (this.appendRow || this.hasFab || this.groupColumn) { let items = [...data]; @@ -672,7 +679,7 @@ export class HaDataTable extends LitElement { > ${groupName === UNDEFINED_GROUP_KEY - ? this.hass.localize("ui.components.data-table.ungrouped") + ? localize("ui.components.data-table.ungrouped") : groupName || ""}
`, }); diff --git a/src/layouts/hass-tabs-subpage-data-table.ts b/src/layouts/hass-tabs-subpage-data-table.ts index 4f062182a2dc..615fb2d5d056 100644 --- a/src/layouts/hass-tabs-subpage-data-table.ts +++ b/src/layouts/hass-tabs-subpage-data-table.ts @@ -430,6 +430,7 @@ export class HaTabsSubpageDataTable extends LitElement { : ""}
- ${this.hass.localize( - "ui.components.subpage-data-table.show_results", - { number: this.data.length } - )} + ${localize("ui.components.subpage-data-table.show_results", { + number: this.data.length, + })}
` From 15589927c8b93e640b74dacda4e9c6d1c88567ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 11:46:55 +0200 Subject: [PATCH 08/18] Update dependency @codemirror/view to v6.28.3 (#21277) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 292983f4ad45..24d847dcce6a 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@codemirror/legacy-modes": "6.4.0", "@codemirror/search": "6.5.6", "@codemirror/state": "6.4.1", - "@codemirror/view": "6.28.2", + "@codemirror/view": "6.28.3", "@egjs/hammerjs": "2.0.17", "@formatjs/intl-datetimeformat": "6.12.5", "@formatjs/intl-displaynames": "6.6.8", diff --git a/yarn.lock b/yarn.lock index 255077cb166b..16d13741a67e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1539,14 +1539,14 @@ __metadata: languageName: node linkType: hard -"@codemirror/view@npm:6.28.2, @codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.17.0, @codemirror/view@npm:^6.23.0, @codemirror/view@npm:^6.27.0": - version: 6.28.2 - resolution: "@codemirror/view@npm:6.28.2" +"@codemirror/view@npm:6.28.3, @codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.17.0, @codemirror/view@npm:^6.23.0, @codemirror/view@npm:^6.27.0": + version: 6.28.3 + resolution: "@codemirror/view@npm:6.28.3" dependencies: "@codemirror/state": "npm:^6.4.0" style-mod: "npm:^4.1.0" w3c-keyname: "npm:^2.2.4" - checksum: 10/c4221d6e47112ec3ec20c954deecab4565a8023dfeefabff8ba1801fb67d2965d49c27853310618fd723077ca86564b4bbefa36f0839d9430518f7d0a1cc3e84 + checksum: 10/4732786b1afa3730a2c08b3711b335b8da2cb76318c9c4b2aeafd868bb36bfaeec826a18669b3d2d0f408e8012734689085633e4b6c3609cd2385838d79e5bc6 languageName: node linkType: hard @@ -8902,7 +8902,7 @@ __metadata: "@codemirror/legacy-modes": "npm:6.4.0" "@codemirror/search": "npm:6.5.6" "@codemirror/state": "npm:6.4.1" - "@codemirror/view": "npm:6.28.2" + "@codemirror/view": "npm:6.28.3" "@egjs/hammerjs": "npm:2.0.17" "@formatjs/intl-datetimeformat": "npm:6.12.5" "@formatjs/intl-displaynames": "npm:6.6.8" From 202bd148efa0141eb65fd1347f16b145e2b54e2a Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 4 Jul 2024 12:29:17 +0200 Subject: [PATCH 09/18] Fix iframe card overflow in vertical stack (#21282) --- src/panels/lovelace/cards/hui-iframe-card.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/panels/lovelace/cards/hui-iframe-card.ts b/src/panels/lovelace/cards/hui-iframe-card.ts index 36cdea605ec3..48113e02d6d8 100644 --- a/src/panels/lovelace/cards/hui-iframe-card.ts +++ b/src/panels/lovelace/cards/hui-iframe-card.ts @@ -129,6 +129,8 @@ export class HuiIframeCard extends LitElement implements LovelaceCard { overflow: hidden; width: 100%; height: 100%; + display: flex; + flex-direction: column; } #root { From b411ae028689f695be4735ed070d20f35368f896 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 19:18:37 +0200 Subject: [PATCH 10/18] Update dependency @lokalise/node-api to v12.6.0 (#21291) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 24d847dcce6a..b5cba2ab3737 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "@babel/preset-typescript": "7.24.7", "@bundle-stats/plugin-webpack-filter": "4.13.3", "@koa/cors": "5.0.0", - "@lokalise/node-api": "12.5.0", + "@lokalise/node-api": "12.6.0", "@octokit/auth-oauth-device": "7.1.1", "@octokit/plugin-retry": "7.1.1", "@octokit/rest": "21.0.0", diff --git a/yarn.lock b/yarn.lock index 16d13741a67e..16ff05d601e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2221,10 +2221,10 @@ __metadata: languageName: node linkType: hard -"@lokalise/node-api@npm:12.5.0": - version: 12.5.0 - resolution: "@lokalise/node-api@npm:12.5.0" - checksum: 10/f070847c5dcf450e060c5cc8a92e1b731c9509c85492ac8864a7e49c16e6532d6aaae76cb3f374c356dbf84d72d548a61d40f89afd6d8090cc16a700b069299a +"@lokalise/node-api@npm:12.6.0": + version: 12.6.0 + resolution: "@lokalise/node-api@npm:12.6.0" + checksum: 10/966f4d014c12ef91745925cd6e21698ca35db6483ee50b938e1029509d7c37d0a881bdc673f18debd2fedcafade8c2ce22aa39bea53e0861ba5243a2c646921b languageName: node linkType: hard @@ -8924,7 +8924,7 @@ __metadata: "@lit-labs/motion": "npm:1.0.7" "@lit-labs/observers": "npm:2.0.2" "@lit-labs/virtualizer": "npm:2.0.13" - "@lokalise/node-api": "npm:12.5.0" + "@lokalise/node-api": "npm:12.6.0" "@lrnwebcomponents/simple-tooltip": "npm:8.0.2" "@material/chips": "npm:=14.0.0-canary.53b3cad2f.0" "@material/data-table": "npm:=14.0.0-canary.53b3cad2f.0" From 1abebdae21b9011af9f19442ee148b6c7310b74f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 20:07:42 +0200 Subject: [PATCH 11/18] Update typescript-eslint monorepo to v7.15.0 (#21296) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +- yarn.lock | 104 +++++++++++++++++++++++++-------------------------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/package.json b/package.json index b5cba2ab3737..aac30ded713c 100644 --- a/package.json +++ b/package.json @@ -185,8 +185,8 @@ "@types/tar": "6.1.13", "@types/ua-parser-js": "0.7.39", "@types/webspeechapi": "0.0.29", - "@typescript-eslint/eslint-plugin": "7.14.1", - "@typescript-eslint/parser": "7.14.1", + "@typescript-eslint/eslint-plugin": "7.15.0", + "@typescript-eslint/parser": "7.15.0", "@web/dev-server": "0.1.38", "@web/dev-server-rollup": "0.4.1", "babel-loader": "9.1.3", diff --git a/yarn.lock b/yarn.lock index 16ff05d601e9..02e62368d9c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4584,15 +4584,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:7.14.1": - version: 7.14.1 - resolution: "@typescript-eslint/eslint-plugin@npm:7.14.1" +"@typescript-eslint/eslint-plugin@npm:7.15.0": + version: 7.15.0 + resolution: "@typescript-eslint/eslint-plugin@npm:7.15.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:7.14.1" - "@typescript-eslint/type-utils": "npm:7.14.1" - "@typescript-eslint/utils": "npm:7.14.1" - "@typescript-eslint/visitor-keys": "npm:7.14.1" + "@typescript-eslint/scope-manager": "npm:7.15.0" + "@typescript-eslint/type-utils": "npm:7.15.0" + "@typescript-eslint/utils": "npm:7.15.0" + "@typescript-eslint/visitor-keys": "npm:7.15.0" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -4603,44 +4603,44 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/48c815dbb92399965483c93b27816fad576c3b3227b59eebfe5525e24d07b39ec8b0c7459de83865c8d61c818696519f50b229714dd3ed705d5b35973bfcc781 + checksum: 10/e6b21687ab9e9dc38eb1b1d90a3ac483f3f5e5e9c49aa8a434a24de016822d65c82b926cda2ae79bac2225bd9495fb04f7aa6afcaad2b09f6129fd8014fbcedd languageName: node linkType: hard -"@typescript-eslint/parser@npm:7.14.1": - version: 7.14.1 - resolution: "@typescript-eslint/parser@npm:7.14.1" +"@typescript-eslint/parser@npm:7.15.0": + version: 7.15.0 + resolution: "@typescript-eslint/parser@npm:7.15.0" dependencies: - "@typescript-eslint/scope-manager": "npm:7.14.1" - "@typescript-eslint/types": "npm:7.14.1" - "@typescript-eslint/typescript-estree": "npm:7.14.1" - "@typescript-eslint/visitor-keys": "npm:7.14.1" + "@typescript-eslint/scope-manager": "npm:7.15.0" + "@typescript-eslint/types": "npm:7.15.0" + "@typescript-eslint/typescript-estree": "npm:7.15.0" + "@typescript-eslint/visitor-keys": "npm:7.15.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/f521462a7005cab5e4923937dcf36713d9438ded175b53332ae469d91cc9eb18cb3a23768b3c52063464280baae83f6b66db28cebb2e262d6d869d1a898b23f3 + checksum: 10/0b5e7a14fa5d0680efb17e750a095729a7fb7c785d7a0fea2f9e6cbfef9e65caab2b751654b348b9ab813d222c1c3f8189ebf48561b81224d1821cee5c99d658 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:7.14.1": - version: 7.14.1 - resolution: "@typescript-eslint/scope-manager@npm:7.14.1" +"@typescript-eslint/scope-manager@npm:7.15.0": + version: 7.15.0 + resolution: "@typescript-eslint/scope-manager@npm:7.15.0" dependencies: - "@typescript-eslint/types": "npm:7.14.1" - "@typescript-eslint/visitor-keys": "npm:7.14.1" - checksum: 10/600a7beb96f5b96f675125285137339c2438b5b26db203a66eef52dd409e8c0db0dafb22c94547dfb963f8efdf63b0fb59e05655e2dcf84d54624863365a59e7 + "@typescript-eslint/types": "npm:7.15.0" + "@typescript-eslint/visitor-keys": "npm:7.15.0" + checksum: 10/45bfdbae2d080691a34f5b37679b4a4067981baa3b82922268abdd21f6917a8dd1c4ccb12133f6c9cce81cfd640040913b223e8125235b92f42fdb57db358a3e languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:7.14.1": - version: 7.14.1 - resolution: "@typescript-eslint/type-utils@npm:7.14.1" +"@typescript-eslint/type-utils@npm:7.15.0": + version: 7.15.0 + resolution: "@typescript-eslint/type-utils@npm:7.15.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.14.1" - "@typescript-eslint/utils": "npm:7.14.1" + "@typescript-eslint/typescript-estree": "npm:7.15.0" + "@typescript-eslint/utils": "npm:7.15.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" peerDependencies: @@ -4648,23 +4648,23 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/75c279948a7e7e546d692e85a0b48fc3b648ffee1773feb7ff199aba1b0847a9a16c432b133aa72d26e645627403852b7dd24829f9b3badd6d4711c4cc38e9e4 + checksum: 10/64fa589b413567df3689a19ef88f3dbaed66d965e39cc548a58626eb5bd8fc4e2338496eb632f3472de9ae9800cb14d0e48ef3508efe80bdb91af8f3f1e56ad7 languageName: node linkType: hard -"@typescript-eslint/types@npm:7.14.1": - version: 7.14.1 - resolution: "@typescript-eslint/types@npm:7.14.1" - checksum: 10/608057582bb195bd746a7bfb7c04dac4be1d4602b8fa681b2d1d50b564362b681dc2ca293b13cc4c7acc454f3a09f1ea2580415347efb7853e5df8ba34b7acdb +"@typescript-eslint/types@npm:7.15.0": + version: 7.15.0 + resolution: "@typescript-eslint/types@npm:7.15.0" + checksum: 10/b36c98344469f4bc54a5199733ea4f6d4d0f2da1070605e60d4031e2da2946b84b91a90108516c8e6e83a21030ba4e935053a0906041c920156de40683297d0b languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:7.14.1": - version: 7.14.1 - resolution: "@typescript-eslint/typescript-estree@npm:7.14.1" +"@typescript-eslint/typescript-estree@npm:7.15.0": + version: 7.15.0 + resolution: "@typescript-eslint/typescript-estree@npm:7.15.0" dependencies: - "@typescript-eslint/types": "npm:7.14.1" - "@typescript-eslint/visitor-keys": "npm:7.14.1" + "@typescript-eslint/types": "npm:7.15.0" + "@typescript-eslint/visitor-keys": "npm:7.15.0" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" @@ -4674,31 +4674,31 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/f75b956f7981712d3f85498f9d9fcc2243d79d6fe71b24bc688a7c43d2a4248f73ecfb78f9d58501fde87fc44b02e26c46f9ea2ae51eb8450db79ca169f91ef9 + checksum: 10/c5fb15108fbbc1bc976e827218ff7bfbc78930c5906292325ee42ba03514623e7b861497b3e3087f71ede9a757b16441286b4d234450450b0dd70ff753782736 languageName: node linkType: hard -"@typescript-eslint/utils@npm:7.14.1": - version: 7.14.1 - resolution: "@typescript-eslint/utils@npm:7.14.1" +"@typescript-eslint/utils@npm:7.15.0": + version: 7.15.0 + resolution: "@typescript-eslint/utils@npm:7.15.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:7.14.1" - "@typescript-eslint/types": "npm:7.14.1" - "@typescript-eslint/typescript-estree": "npm:7.14.1" + "@typescript-eslint/scope-manager": "npm:7.15.0" + "@typescript-eslint/types": "npm:7.15.0" + "@typescript-eslint/typescript-estree": "npm:7.15.0" peerDependencies: eslint: ^8.56.0 - checksum: 10/1ef74214ca84e32f151364512a51e82b7da5590dee03d0de0e1abcf18009e569f9a0638506cf03bd4a844af634b4935458e334b7b2459e9a50a67aba7d6228c7 + checksum: 10/f6de1849dee610a8110638be98ab2ec09e7cdf2f756b538b0544df2dfad86a8e66d5326a765302fe31553e8d9d3170938c0d5d38bd9c7d36e3ee0beb1bdc8172 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:7.14.1": - version: 7.14.1 - resolution: "@typescript-eslint/visitor-keys@npm:7.14.1" +"@typescript-eslint/visitor-keys@npm:7.15.0": + version: 7.15.0 + resolution: "@typescript-eslint/visitor-keys@npm:7.15.0" dependencies: - "@typescript-eslint/types": "npm:7.14.1" + "@typescript-eslint/types": "npm:7.15.0" eslint-visitor-keys: "npm:^3.4.3" - checksum: 10/42246f33cb3f9185c0b467c9a534e34a674e4fc08ba982a03aaa77dc1e569e916f1fca9ce9cd14c4df91f416e6e917bff51f98b8d8ca26ec5f67c253e8646bde + checksum: 10/0e17d7f5de767da7f98170c2efc905cdb0ceeaf04a667e12ca1a92eae64479a07f4f8e2a9b5023b055b01250916c3bcac86908cd06552610baff734fafae4464 languageName: node linkType: hard @@ -8986,8 +8986,8 @@ __metadata: "@types/tar": "npm:6.1.13" "@types/ua-parser-js": "npm:0.7.39" "@types/webspeechapi": "npm:0.0.29" - "@typescript-eslint/eslint-plugin": "npm:7.14.1" - "@typescript-eslint/parser": "npm:7.14.1" + "@typescript-eslint/eslint-plugin": "npm:7.15.0" + "@typescript-eslint/parser": "npm:7.15.0" "@vaadin/combo-box": "npm:24.4.0" "@vaadin/vaadin-themable-mixin": "npm:24.4.0" "@vibrant/color": "npm:3.2.1-alpha.1" From 050bef056431b98f1d398c87740070250f66e421 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 4 Jul 2024 21:09:10 +0200 Subject: [PATCH 12/18] Better handle auto height in card resize editor (#21260) * Add auto-height option to resize editor * Use min instead of max * Remove auto height --- src/components/ha-grid-size-picker.ts | 33 +++++++++++-------- .../card-editor/ha-grid-layout-slider.ts | 3 ++ .../card-editor/hui-card-layout-editor.ts | 8 +++-- .../lovelace/sections/hui-grid-section.ts | 4 +-- src/panels/lovelace/types.ts | 2 +- 5 files changed, 32 insertions(+), 18 deletions(-) diff --git a/src/components/ha-grid-size-picker.ts b/src/components/ha-grid-size-picker.ts index 453a24cb8d30..6ae6b7b37d75 100644 --- a/src/components/ha-grid-size-picker.ts +++ b/src/components/ha-grid-size-picker.ts @@ -10,7 +10,7 @@ import { HomeAssistant } from "../types"; import { conditionalClamp } from "../common/number/clamp"; type GridSizeValue = { - rows?: number; + rows?: number | "auto"; columns?: number; }; @@ -47,6 +47,16 @@ export class HaGridSizeEditor extends LitElement { this.columnMin !== undefined && this.columnMin === this.columnMax; const disabledRows = this.rowMin !== undefined && this.rowMin === this.rowMax; + + const autoHeight = this._localValue?.rows === "auto"; + + const rowMin = this.rowMin ?? 1; + const rowMax = this.rowMax ?? this.rows; + const columnMin = this.columnMin ?? 1; + const columnMax = this.columnMax ?? this.columns; + const rowValue = autoHeight ? rowMin : this._localValue?.rows; + const columnValue = this._localValue?.columns; + return html`
+
@@ -215,10 +226,6 @@ export class HaGridSizeEditor extends LitElement { opacity: 0.2; cursor: pointer; } - .preview .cell[disabled] { - opacity: 0.05; - cursor: initial; - } .selected { pointer-events: none; } diff --git a/src/panels/lovelace/editor/card-editor/ha-grid-layout-slider.ts b/src/panels/lovelace/editor/card-editor/ha-grid-layout-slider.ts index ab1bebf00fcc..cfbbd31c3aec 100644 --- a/src/panels/lovelace/editor/card-editor/ha-grid-layout-slider.ts +++ b/src/panels/lovelace/editor/card-editor/ha-grid-layout-slider.ts @@ -378,6 +378,9 @@ export class HaGridLayoutSlider extends LitElement { :host(:disabled) .handle:after { background: var(--disabled-color); } + :host(:disabled) .active { + background: var(--disabled-color); + } .pressed .handle { transition: none; } diff --git a/src/panels/lovelace/editor/card-editor/hui-card-layout-editor.ts b/src/panels/lovelace/editor/card-editor/hui-card-layout-editor.ts index 5a5690727ce6..ac32343f75e9 100644 --- a/src/panels/lovelace/editor/card-editor/hui-card-layout-editor.ts +++ b/src/panels/lovelace/editor/card-editor/hui-card-layout-editor.ts @@ -11,8 +11,10 @@ import "../../../../components/ha-button-menu"; import "../../../../components/ha-grid-size-picker"; import "../../../../components/ha-icon-button"; import "../../../../components/ha-list-item"; +import "../../../../components/ha-settings-row"; import "../../../../components/ha-slider"; import "../../../../components/ha-svg-icon"; +import "../../../../components/ha-switch"; import "../../../../components/ha-yaml-editor"; import type { HaYamlEditor } from "../../../../components/ha-yaml-editor"; import { LovelaceCardConfig } from "../../../../data/lovelace/config/card"; @@ -61,11 +63,13 @@ export class HuiCardLayoutEditor extends LitElement { this._defaultLayoutOptions ); + const sizeValue = this._gridSizeValue(options); + return html`

${this.hass.localize( - `ui.panel.lovelace.editor.edit_card.layout.explanation` + "ui.panel.lovelace.editor.edit_card.layout.explanation" )}

Date: Thu, 4 Jul 2024 21:09:34 +0200 Subject: [PATCH 13/18] Change delete/remove wording in tag area to be consistent (#21299) delete tags --- src/panels/config/tags/ha-config-tags.ts | 7 ++++--- src/translations/en.json | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/panels/config/tags/ha-config-tags.ts b/src/panels/config/tags/ha-config-tags.ts index 98ae4252f802..933490adfe3c 100644 --- a/src/panels/config/tags/ha-config-tags.ts +++ b/src/panels/config/tags/ha-config-tags.ts @@ -301,12 +301,13 @@ export class HaConfigTags extends SubscribeMixin(LitElement) { private async _removeTag(selectedTag: Tag) { if ( !(await showConfirmationDialog(this, { - title: this.hass!.localize("ui.panel.config.tag.confirm_remove_title"), - text: this.hass.localize("ui.panel.config.tag.confirm_remove", { + title: this.hass!.localize("ui.panel.config.tag.confirm_delete_title"), + text: this.hass.localize("ui.panel.config.tag.confirm_delete", { tag: selectedTag.name || selectedTag.id, }), dismissText: this.hass!.localize("ui.common.cancel"), - confirmText: this.hass!.localize("ui.common.remove"), + confirmText: this.hass!.localize("ui.common.delete"), + destructive: true, })) ) { return false; diff --git a/src/translations/en.json b/src/translations/en.json index 541d0fcc92c4..f73378c16bf4 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -2107,8 +2107,8 @@ "edit": "Edit", "never_scanned": "Never scanned", "create_automation": "Create automation with tag", - "confirm_remove_title": "Remove tag?", - "confirm_remove": "Are you sure you want to remove tag {tag}?", + "confirm_delete_title": "Delete tag?", + "confirm_delete": "Are you sure you want to delete tag {tag}?", "automation_title": "Tag {name} is scanned", "qr_code_image": "QR code for tag {name}", "headers": { From dc93a0ce54b6001a13c90832960eac30944877bf Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 4 Jul 2024 21:18:50 +0200 Subject: [PATCH 14/18] Fix energy selection date card in grid layout (#21293) Fix energy selection card in grid layout --- .../energy/hui-energy-date-selection-card.ts | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/panels/lovelace/cards/energy/hui-energy-date-selection-card.ts b/src/panels/lovelace/cards/energy/hui-energy-date-selection-card.ts index d6ab8eb4929a..0b2ff5fa817b 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-date-selection-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-date-selection-card.ts @@ -1,17 +1,17 @@ import { - html, - LitElement, - nothing, - css, CSSResultGroup, + LitElement, PropertyValues, + css, + html, + nothing, } from "lit"; import { customElement, property, state } from "lit/decorators"; import { HomeAssistant } from "../../../../types"; +import { hasConfigChanged } from "../../common/has-changed"; import "../../components/hui-energy-period-selector"; -import { LovelaceCard } from "../../types"; +import { LovelaceCard, LovelaceLayoutOptions } from "../../types"; import { EnergyCardBaseConfig } from "../types"; -import { hasConfigChanged } from "../../common/has-changed"; @customElement("hui-energy-date-selection-card") export class HuiEnergyDateSelectionCard @@ -26,6 +26,13 @@ export class HuiEnergyDateSelectionCard return 1; } + public getLayoutOptions(): LovelaceLayoutOptions { + return { + grid_rows: 1, + grid_columns: 4, + }; + } + public setConfig(config: EnergyCardBaseConfig): void { this._config = config; } @@ -57,6 +64,13 @@ export class HuiEnergyDateSelectionCard static get styles(): CSSResultGroup { return css` + :host { + ha-card { + height: 100%; + display: flex; + flex-direction: column; + justify-content: center; + } .padded { padding-left: 16px !important; padding-inline-start: 16px !important; From 7f50504908d414308df04f276ec8933e9892f52d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 19:21:19 +0000 Subject: [PATCH 15/18] Update dependency typescript to v5.5.3 (#21300) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index aac30ded713c..baf9e0afd94f 100644 --- a/package.json +++ b/package.json @@ -237,7 +237,7 @@ "terser-webpack-plugin": "5.3.10", "transform-async-modules-webpack-plugin": "1.1.1", "ts-lit-plugin": "2.0.2", - "typescript": "5.5.2", + "typescript": "5.5.3", "webpack": "5.92.1", "webpack-cli": "5.1.4", "webpack-dev-server": "5.0.4", diff --git a/yarn.lock b/yarn.lock index 02e62368d9c3..e43e25715610 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9083,7 +9083,7 @@ __metadata: ts-lit-plugin: "npm:2.0.2" tsparticles-engine: "npm:2.12.0" tsparticles-preset-links: "npm:2.12.0" - typescript: "npm:5.5.2" + typescript: "npm:5.5.3" ua-parser-js: "npm:1.0.38" unfetch: "npm:5.0.0" vis-data: "npm:7.1.9" @@ -14209,13 +14209,13 @@ __metadata: languageName: node linkType: hard -"typescript@npm:5.5.2": - version: 5.5.2 - resolution: "typescript@npm:5.5.2" +"typescript@npm:5.5.3": + version: 5.5.3 + resolution: "typescript@npm:5.5.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/9118b20f248e76b0dbff8737fef65dfa89d02668d4e633d2c5ceac99033a0ca5e8a1c1a53bc94da68e8f67677a88f318663dde859c9e9a09c1e116415daec2ba + checksum: 10/11a867312419ed497929aafd2f1d28b2cd41810a5eb6c6e9e169559112e9ea073d681c121a29102e67cd4478d0a4ae37a306a5800f3717f59c4337e6a9bd5e8d languageName: node linkType: hard @@ -14229,13 +14229,13 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.5.2#optional!builtin": - version: 5.5.2 - resolution: "typescript@patch:typescript@npm%3A5.5.2#optional!builtin::version=5.5.2&hash=379a07" +"typescript@patch:typescript@npm%3A5.5.3#optional!builtin": + version: 5.5.3 + resolution: "typescript@patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/ac3145f65cf9e72ab29f2196e05d5816b355dc1a9195b9f010d285182a12457cfacd068be2dd22c877f88ebc966ac6e0e83f51c8586412b16499a27e3670ff4b + checksum: 10/7cf7acb78a80f749b82842f2ffe01e90e7b3e709a6f4268588e0b7599c41dca1059be217f47778fe1a380bfaf60933021ef20d002c426d4d7745e1b36c11467b languageName: node linkType: hard From f995f19f061be75279551eead79732758a3f3064 Mon Sep 17 00:00:00 2001 From: Matthias de Baat Date: Fri, 5 Jul 2024 09:00:19 +0200 Subject: [PATCH 16/18] Clarify remove vs. delete (#21297) Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com> Co-authored-by: Franck Nijhof --- .../src/pages/Text/remove-delete-add-create.markdown | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gallery/src/pages/Text/remove-delete-add-create.markdown b/gallery/src/pages/Text/remove-delete-add-create.markdown index 89c61db6383a..3b0bb85c3676 100644 --- a/gallery/src/pages/Text/remove-delete-add-create.markdown +++ b/gallery/src/pages/Text/remove-delete-add-create.markdown @@ -3,13 +3,16 @@ title: When to use remove, delete, add and create subtitle: The difference between remove/delete and add/create. --- -# Remove vs Delete +# Removing or deleting content -Remove and Delete are quite similar, but can be frustrating if used inconsistently. +_Remove_ and _Delete_ are quite similar, but can be frustrating if used inconsistently. + +- Remove refers to an action that can be restored or reapplied. +- Delete refers to a permanent, non-recoverable action. ## Remove -Take away and set aside, but kept in existence. +The term _Remove_ should always be used when an item/setting or content is to be removed or disassociated, but the action can be reversed or reapplied. For example: @@ -22,7 +25,7 @@ For example: ## Delete -Erase, rendered nonexistent or nonrecoverable. +The term _Delete_ should always be used to refer to any action that will cause the permanent deletion of an item/setting or content. For example: From f7072c247e8ea13ff9b894871e6f27341389b3f2 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 5 Jul 2024 12:17:31 +0200 Subject: [PATCH 17/18] Improve sensor card graph inside section grid (#21289) --- src/panels/lovelace/cards/hui-entity-card.ts | 24 ++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/panels/lovelace/cards/hui-entity-card.ts b/src/panels/lovelace/cards/hui-entity-card.ts index 42861e70fe4e..3e06cf7bf197 100644 --- a/src/panels/lovelace/cards/hui-entity-card.ts +++ b/src/panels/lovelace/cards/hui-entity-card.ts @@ -8,6 +8,7 @@ import { PropertyValues, } from "lit"; import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { ifDefined } from "lit/directives/if-defined"; import { styleMap } from "lit/directives/style-map"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; @@ -73,6 +74,8 @@ export class HuiEntityCard extends LitElement implements LovelaceCard { @property({ attribute: false }) public hass?: HomeAssistant; + @property() public layout?: string; + @state() private _config?: EntityCardConfig; private _footerElement?: HuiErrorCard | LovelaceHeaderFooter; @@ -132,8 +135,15 @@ export class HuiEntityCard extends LitElement implements LovelaceCard { const colored = stateObj && this.getStateColor(stateObj, this._config); + const fixedFooter = + this.layout === "grid" || this._footerElement !== undefined; + return html` - +
${name}
@@ -188,7 +198,7 @@ export class HuiEntityCard extends LitElement implements LovelaceCard { ` : ""}
- ${this._footerElement} + `; } @@ -309,6 +319,16 @@ export class HuiEntityCard extends LitElement implements LovelaceCard { font-size: 18px; color: var(--secondary-text-color); } + + .with-fixed-footer { + justify-content: flex-start; + } + .with-fixed-footer .footer { + position: absolute; + right: 0; + left: 0; + bottom: 0; + } `, ]; } From 42b5fbec9bd0c4dd7a871d80b9b3082da1dade2f Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 5 Jul 2024 13:22:23 +0200 Subject: [PATCH 18/18] Bumped version to 20240705.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6aa93e24f7a8..402d7c3b98b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20240703.0" +version = "20240705.0" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md"