mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Add additional properties to zwave_js device info panel (#10132)
This commit is contained in:
parent
9bcd26ce57
commit
5c3e0cc016
@ -84,6 +84,9 @@ export interface ZWaveJSNodeStatus {
|
|||||||
ready: boolean;
|
ready: boolean;
|
||||||
status: number;
|
status: number;
|
||||||
is_secure: boolean | string;
|
is_secure: boolean | string;
|
||||||
|
is_routing: boolean | null;
|
||||||
|
zwave_plus_version: number | null;
|
||||||
|
highest_security_class: SecurityClass | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ZwaveJSNodeMetadata {
|
export interface ZwaveJSNodeMetadata {
|
||||||
|
@ -18,6 +18,7 @@ import {
|
|||||||
nodeStatus,
|
nodeStatus,
|
||||||
ZWaveJSNodeStatus,
|
ZWaveJSNodeStatus,
|
||||||
ZWaveJSNodeIdentifiers,
|
ZWaveJSNodeIdentifiers,
|
||||||
|
SecurityClass,
|
||||||
} from "../../../../../../data/zwave_js";
|
} from "../../../../../../data/zwave_js";
|
||||||
import { haStyle } from "../../../../../../resources/styles";
|
import { haStyle } from "../../../../../../resources/styles";
|
||||||
import { HomeAssistant } from "../../../../../../types";
|
import { HomeAssistant } from "../../../../../../types";
|
||||||
@ -117,13 +118,33 @@ export class HaDeviceInfoZWaveJS extends LitElement {
|
|||||||
: this.hass.localize("ui.common.no")}
|
: this.hass.localize("ui.common.no")}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
${this.hass.localize("ui.panel.config.zwave_js.device_info.is_secure")}:
|
${this.hass.localize(
|
||||||
${this._node.is_secure === true
|
"ui.panel.config.zwave_js.device_info.highest_security"
|
||||||
? this.hass.localize("ui.common.yes")
|
)}:
|
||||||
|
${this._node.highest_security_class !== null
|
||||||
|
? this.hass.localize(
|
||||||
|
`ui.panel.config.zwave_js.security_classes.${
|
||||||
|
SecurityClass[this._node.highest_security_class]
|
||||||
|
}.title`
|
||||||
|
)
|
||||||
: this._node.is_secure === false
|
: this._node.is_secure === false
|
||||||
? this.hass.localize("ui.common.no")
|
? this.hass.localize(
|
||||||
|
"ui.panel.config.zwave_js.security_classes.none.title"
|
||||||
|
)
|
||||||
: this.hass.localize("ui.panel.config.zwave_js.device_info.unknown")}
|
: this.hass.localize("ui.panel.config.zwave_js.device_info.unknown")}
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
${this.hass.localize(
|
||||||
|
"ui.panel.config.zwave_js.device_info.zwave_plus"
|
||||||
|
)}:
|
||||||
|
${this._node.zwave_plus_version
|
||||||
|
? this.hass.localize(
|
||||||
|
"ui.panel.config.zwave_js.device_info.zwave_plus_version",
|
||||||
|
"version",
|
||||||
|
this._node.zwave_plus_version
|
||||||
|
)
|
||||||
|
: this.hass.localize("ui.common.no")}
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,12 +202,12 @@ class DialogZWaveJSAddNode extends LitElement {
|
|||||||
(securityClass) => html`<ha-formfield
|
(securityClass) => html`<ha-formfield
|
||||||
.label=${html`<b
|
.label=${html`<b
|
||||||
>${this.hass.localize(
|
>${this.hass.localize(
|
||||||
`ui.panel.config.zwave_js.add_node.security_classes.${SecurityClass[securityClass]}.title`
|
`ui.panel.config.zwave_js.security_classes.${SecurityClass[securityClass]}.title`
|
||||||
)}</b
|
)}</b
|
||||||
>
|
>
|
||||||
<div class="secondary">
|
<div class="secondary">
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
`ui.panel.config.zwave_js.add_node.security_classes.${SecurityClass[securityClass]}.description`
|
`ui.panel.config.zwave_js.security_classes.${SecurityClass[securityClass]}.description`
|
||||||
)}
|
)}
|
||||||
</div>`}
|
</div>`}
|
||||||
>
|
>
|
||||||
|
@ -2831,8 +2831,10 @@
|
|||||||
"reinterview_device": "Re-interview Device",
|
"reinterview_device": "Re-interview Device",
|
||||||
"heal_node": "Heal Device",
|
"heal_node": "Heal Device",
|
||||||
"remove_failed": "Remove Failed Device",
|
"remove_failed": "Remove Failed Device",
|
||||||
"is_secure": "Secure",
|
"highest_security": "Highest Security",
|
||||||
"unknown": "Unknown"
|
"unknown": "Unknown",
|
||||||
|
"zwave_plus": "Z-Wave Plus",
|
||||||
|
"zwave_plus_version": "Version {version}"
|
||||||
},
|
},
|
||||||
"node_config": {
|
"node_config": {
|
||||||
"header": "Z-Wave Device Configuration",
|
"header": "Z-Wave Device Configuration",
|
||||||
@ -2868,8 +2870,12 @@
|
|||||||
"inclusion_finished": "The device has been added.",
|
"inclusion_finished": "The device has been added.",
|
||||||
"view_device": "View Device",
|
"view_device": "View Device",
|
||||||
"interview_started": "The device is being interviewed. This may take some time.",
|
"interview_started": "The device is being interviewed. This may take some time.",
|
||||||
"interview_failed": "The device interview failed. Additional information may be available in the logs.",
|
"interview_failed": "The device interview failed. Additional information may be available in the logs."
|
||||||
|
},
|
||||||
"security_classes": {
|
"security_classes": {
|
||||||
|
"None": {
|
||||||
|
"title": "None"
|
||||||
|
},
|
||||||
"S2_Unauthenticated": {
|
"S2_Unauthenticated": {
|
||||||
"title": "S2 Unauthenticated",
|
"title": "S2 Unauthenticated",
|
||||||
"description": "Like S2 Authenticated, but without verification that the correct device is included"
|
"description": "Like S2 Authenticated, but without verification that the correct device is included"
|
||||||
@ -2886,7 +2892,6 @@
|
|||||||
"title": "S0 Legacy",
|
"title": "S0 Legacy",
|
||||||
"description": "Example: Legacy Door Locks without S2 support"
|
"description": "Example: Legacy Door Locks without S2 support"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"remove_node": {
|
"remove_node": {
|
||||||
"title": "Remove a Z-Wave device",
|
"title": "Remove a Z-Wave device",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user