Make name a top level field for the SSDP panel (#25232)

* Make name a top level field for the SSDP panel

* Make name a top level field for the SSDP panel
This commit is contained in:
J. Nick Koston 2025-04-30 09:39:01 +02:00 committed by GitHub
parent 92353ebed5
commit 5d2d6dcd6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import type { Store } from "home-assistant-js-websocket/dist/store";
import type { DataTableRowData } from "../components/data-table/ha-data-table"; import type { DataTableRowData } from "../components/data-table/ha-data-table";
export interface SSDPDiscoveryData extends DataTableRowData { export interface SSDPDiscoveryData extends DataTableRowData {
name: string | undefined;
ssdp_usn: string; ssdp_usn: string;
ssdp_st: string; ssdp_st: string;
upnp: Record<string, unknown>; upnp: Record<string, unknown>;

View File

@ -54,6 +54,8 @@ class DialogSSDPDiscoveryInfo extends LitElement implements HassDialog {
)} )}
> >
<p> <p>
<b>${this.hass.localize("ui.panel.config.ssdp.name")}</b>:
${this._params.entry.name} <br />
<b>${this.hass.localize("ui.panel.config.ssdp.ssdp_st")}</b>: <b>${this.hass.localize("ui.panel.config.ssdp.ssdp_st")}</b>:
${this._params.entry.ssdp_st} <br /> ${this._params.entry.ssdp_st} <br />
<b>${this.hass.localize("ui.panel.config.ssdp.ssdp_location")}</b>: <b>${this.hass.localize("ui.panel.config.ssdp.ssdp_location")}</b>:

View File

@ -57,14 +57,21 @@ export class SSDPConfigPanel extends SubscribeMixin(LitElement) {
private _columns = memoizeOne( private _columns = memoizeOne(
(localize: LocalizeFunc): DataTableColumnContainer => { (localize: LocalizeFunc): DataTableColumnContainer => {
const columns: DataTableColumnContainer<SSDPDiscoveryData> = { const columns: DataTableColumnContainer<SSDPDiscoveryData> = {
ssdp_st: { name: {
title: localize("ui.panel.config.ssdp.ssdp_st"), title: localize("ui.panel.config.ssdp.name"),
sortable: true, sortable: true,
filterable: true, filterable: true,
showNarrow: true, showNarrow: true,
main: true, main: true,
hideable: false, hideable: false,
moveable: false, moveable: false,
},
ssdp_st: {
title: localize("ui.panel.config.ssdp.ssdp_st"),
sortable: true,
filterable: true,
showNarrow: true,
hideable: false,
direction: "asc", direction: "asc",
}, },
ssdp_location: { ssdp_location: {

View File

@ -5568,6 +5568,7 @@
"thread_network_delete_credentials": "Delete Thread network credentials" "thread_network_delete_credentials": "Delete Thread network credentials"
}, },
"ssdp": { "ssdp": {
"name": "Name",
"ssdp_st": "Search Target (ST)", "ssdp_st": "Search Target (ST)",
"ssdp_location": "Device Description URL", "ssdp_location": "Device Description URL",
"ssdp_headers": "SSDP Headers", "ssdp_headers": "SSDP Headers",