mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 14:56:37 +00:00
parent
8f984517bb
commit
7050453783
@ -35,6 +35,7 @@ export interface MatterNodeDiagnostics {
|
|||||||
mac_address?: string;
|
mac_address?: string;
|
||||||
available: boolean;
|
available: boolean;
|
||||||
active_fabrics: MatterFabricData[];
|
active_fabrics: MatterFabricData[];
|
||||||
|
active_fabric_index: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MatterPingResult {
|
export interface MatterPingResult {
|
||||||
|
@ -20,8 +20,6 @@ import { haStyleDialog } from "../../../../../resources/styles";
|
|||||||
import { HomeAssistant } from "../../../../../types";
|
import { HomeAssistant } from "../../../../../types";
|
||||||
import { MatterManageFabricsDialogParams } from "./show-dialog-matter-manage-fabrics";
|
import { MatterManageFabricsDialogParams } from "./show-dialog-matter-manage-fabrics";
|
||||||
|
|
||||||
const NABUCASA_FABRIC = 4939;
|
|
||||||
|
|
||||||
@customElement("dialog-matter-manage-fabrics")
|
@customElement("dialog-matter-manage-fabrics")
|
||||||
class DialogMatterManageFabrics extends LitElement {
|
class DialogMatterManageFabrics extends LitElement {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
@ -61,8 +59,9 @@ class DialogMatterManageFabrics extends LitElement {
|
|||||||
(fabric) =>
|
(fabric) =>
|
||||||
html`<ha-list-item
|
html`<ha-list-item
|
||||||
noninteractive
|
noninteractive
|
||||||
.hasMeta=${this._nodeDiagnostics?.available &&
|
.hasMeta=${this._nodeDiagnostics!.available &&
|
||||||
fabric.vendor_id !== NABUCASA_FABRIC}
|
fabric.fabric_index !==
|
||||||
|
this._nodeDiagnostics!.active_fabric_index}
|
||||||
>${fabric.vendor_name ||
|
>${fabric.vendor_name ||
|
||||||
fabric.fabric_label ||
|
fabric.fabric_label ||
|
||||||
fabric.vendor_id}
|
fabric.vendor_id}
|
||||||
@ -99,6 +98,9 @@ class DialogMatterManageFabrics extends LitElement {
|
|||||||
|
|
||||||
private async _removeFabric(ev) {
|
private async _removeFabric(ev) {
|
||||||
const fabric: MatterFabricData = ev.target.fabric;
|
const fabric: MatterFabricData = ev.target.fabric;
|
||||||
|
if (this._nodeDiagnostics!.active_fabric_index === fabric.fabric_index) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const fabricName =
|
const fabricName =
|
||||||
fabric.vendor_name || fabric.fabric_label || fabric.vendor_id.toString();
|
fabric.vendor_name || fabric.fabric_label || fabric.vendor_id.toString();
|
||||||
const confirm = await showConfirmationDialog(this, {
|
const confirm = await showConfirmationDialog(this, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user