1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-02-15 07:25:54 +00:00

Add entities to device page overflow menu (#28497)

This commit is contained in:
Aidan Timson
2025-12-11 14:07:04 +00:00
committed by GitHub
parent fee16ed4e4
commit 6306890922

View File

@@ -9,6 +9,7 @@ import {
mdiPencil,
mdiPlusCircle,
mdiRestore,
mdiShapeOutline,
} from "@mdi/js";
import type { HassEntity } from "home-assistant-js-websocket";
import type { CSSResultGroup, PropertyValues, TemplateResult } from "lit";
@@ -694,6 +695,22 @@ export class HaConfigDevicePage extends LitElement {
.path=${mdiDotsVertical}
></ha-icon-button>
<ha-md-menu-item
type="link"
href=${`/config/entities?historyBack=1&device=${this.deviceId}`}
>
<ha-svg-icon .path=${mdiShapeOutline} slot="start"></ha-svg-icon>
<div slot="headline">
${this.hass.localize(
`ui.panel.config.integrations.config_entry.entities`,
{ count: entities.length }
)}
</div>
<ha-icon-next slot="end"></ha-icon-next>
</ha-md-menu-item>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item .clickAction=${this._resetEntityIds}>
<ha-svg-icon slot="start" .path=${mdiRestore}></ha-svg-icon>
<div slot="headline">