mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
Remove node status from zwave_js device info card (#17732)
This commit is contained in:
parent
40c7bc08d9
commit
d817e92a57
@ -404,8 +404,6 @@ export interface RequestedGrant {
|
|||||||
clientSideAuth: boolean;
|
clientSideAuth: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const nodeStatus = ["unknown", "asleep", "awake", "dead", "alive"];
|
|
||||||
|
|
||||||
export const fetchZwaveNetworkStatus = (
|
export const fetchZwaveNetworkStatus = (
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
device_or_entry_id: {
|
device_or_entry_id: {
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { UnsubscribeFunc } from "home-assistant-js-websocket";
|
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResultGroup,
|
CSSResultGroup,
|
||||||
@ -16,9 +15,7 @@ import {
|
|||||||
import { DeviceRegistryEntry } from "../../../../../../data/device_registry";
|
import { DeviceRegistryEntry } from "../../../../../../data/device_registry";
|
||||||
import {
|
import {
|
||||||
fetchZwaveNodeStatus,
|
fetchZwaveNodeStatus,
|
||||||
nodeStatus,
|
|
||||||
SecurityClass,
|
SecurityClass,
|
||||||
subscribeZwaveNodeStatus,
|
|
||||||
ZWaveJSNodeStatus,
|
ZWaveJSNodeStatus,
|
||||||
} from "../../../../../../data/zwave_js";
|
} from "../../../../../../data/zwave_js";
|
||||||
import { SubscribeMixin } from "../../../../../../mixins/subscribe-mixin";
|
import { SubscribeMixin } from "../../../../../../mixins/subscribe-mixin";
|
||||||
@ -44,21 +41,6 @@ export class HaDeviceInfoZWaveJS extends SubscribeMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public hassSubscribe(): Array<UnsubscribeFunc | Promise<UnsubscribeFunc>> {
|
|
||||||
return [
|
|
||||||
subscribeZwaveNodeStatus(this.hass, this.device!.id, (message) => {
|
|
||||||
if (!this._node) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this._node = {
|
|
||||||
...this._node,
|
|
||||||
status: message.status,
|
|
||||||
ready: message.ready,
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
protected async _fetchNodeDetails() {
|
protected async _fetchNodeDetails() {
|
||||||
if (!this.device) {
|
if (!this.device) {
|
||||||
return;
|
return;
|
||||||
@ -112,16 +94,6 @@ export class HaDeviceInfoZWaveJS extends SubscribeMixin(LitElement) {
|
|||||||
</div>
|
</div>
|
||||||
${!this._node.is_controller_node
|
${!this._node.is_controller_node
|
||||||
? html`
|
? html`
|
||||||
<div>
|
|
||||||
${this.hass.localize(
|
|
||||||
"ui.panel.config.zwave_js.device_info.node_status"
|
|
||||||
)}:
|
|
||||||
${this.hass.localize(
|
|
||||||
`ui.panel.config.zwave_js.node_status.${
|
|
||||||
nodeStatus[this._node.status]
|
|
||||||
}`
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.zwave_js.device_info.node_ready"
|
"ui.panel.config.zwave_js.device_info.node_ready"
|
||||||
|
@ -3960,7 +3960,6 @@
|
|||||||
"device_info": {
|
"device_info": {
|
||||||
"zwave_info": "Z-Wave info",
|
"zwave_info": "Z-Wave info",
|
||||||
"node_id": "ID",
|
"node_id": "ID",
|
||||||
"node_status": "Status",
|
|
||||||
"node_ready": "Ready",
|
"node_ready": "Ready",
|
||||||
"device_config": "Configure",
|
"device_config": "Configure",
|
||||||
"reinterview_device": "Re-interview",
|
"reinterview_device": "Re-interview",
|
||||||
@ -4067,13 +4066,6 @@
|
|||||||
"parameter": "Parameter",
|
"parameter": "Parameter",
|
||||||
"bitmask": "Bitmask"
|
"bitmask": "Bitmask"
|
||||||
},
|
},
|
||||||
"node_status": {
|
|
||||||
"unknown": "Unknown",
|
|
||||||
"asleep": "Asleep",
|
|
||||||
"awake": "Awake",
|
|
||||||
"dead": "Dead",
|
|
||||||
"alive": "Alive"
|
|
||||||
},
|
|
||||||
"network_status": {
|
"network_status": {
|
||||||
"connected": "Connected",
|
"connected": "Connected",
|
||||||
"connecting": "Connecting",
|
"connecting": "Connecting",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user