mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +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;
|
||||
}
|
||||
|
||||
export const nodeStatus = ["unknown", "asleep", "awake", "dead", "alive"];
|
||||
|
||||
export const fetchZwaveNetworkStatus = (
|
||||
hass: HomeAssistant,
|
||||
device_or_entry_id: {
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { UnsubscribeFunc } from "home-assistant-js-websocket";
|
||||
import {
|
||||
css,
|
||||
CSSResultGroup,
|
||||
@ -16,9 +15,7 @@ import {
|
||||
import { DeviceRegistryEntry } from "../../../../../../data/device_registry";
|
||||
import {
|
||||
fetchZwaveNodeStatus,
|
||||
nodeStatus,
|
||||
SecurityClass,
|
||||
subscribeZwaveNodeStatus,
|
||||
ZWaveJSNodeStatus,
|
||||
} from "../../../../../../data/zwave_js";
|
||||
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() {
|
||||
if (!this.device) {
|
||||
return;
|
||||
@ -112,16 +94,6 @@ export class HaDeviceInfoZWaveJS extends SubscribeMixin(LitElement) {
|
||||
</div>
|
||||
${!this._node.is_controller_node
|
||||
? 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>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.zwave_js.device_info.node_ready"
|
||||
|
@ -3960,7 +3960,6 @@
|
||||
"device_info": {
|
||||
"zwave_info": "Z-Wave info",
|
||||
"node_id": "ID",
|
||||
"node_status": "Status",
|
||||
"node_ready": "Ready",
|
||||
"device_config": "Configure",
|
||||
"reinterview_device": "Re-interview",
|
||||
@ -4067,13 +4066,6 @@
|
||||
"parameter": "Parameter",
|
||||
"bitmask": "Bitmask"
|
||||
},
|
||||
"node_status": {
|
||||
"unknown": "Unknown",
|
||||
"asleep": "Asleep",
|
||||
"awake": "Awake",
|
||||
"dead": "Dead",
|
||||
"alive": "Alive"
|
||||
},
|
||||
"network_status": {
|
||||
"connected": "Connected",
|
||||
"connecting": "Connecting",
|
||||
|
Loading…
x
Reference in New Issue
Block a user