-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add zwave_js device statistics #12794
Conversation
We should update the styling of the data, the text is too small now, and should be in primary color |
src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-node-statistics.ts
Show resolved
Hide resolved
src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-node-statistics.ts
Outdated
Show resolved
Hide resolved
OK all comments addressed. I got feedback from Dominic that |
Object.entries(this._deviceIDsToDevices).forEach(([_, device]) => { | ||
if (!devices.includes(device)) | ||
delete this._deviceIDsToDevices[device.id]; | ||
}); | ||
devices.forEach((device) => { | ||
this._deviceIDsToDevices[device.id] = device; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Object.entries(this._deviceIDsToDevices).forEach(([_, device]) => { | |
if (!devices.includes(device)) | |
delete this._deviceIDsToDevices[device.id]; | |
}); | |
devices.forEach((device) => { | |
this._deviceIDsToDevices[device.id] = device; | |
}); | |
const devicesIdToName = {}; | |
devices.forEach(device => {devicesIdToName[device.id] = computeDeviceName(device, this.hass)}); | |
this._deviceIDsToName = devicesIdToName; |
This makes sure it triggers an update when the devices are updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I applied the same approach to this._workingRoutes
…log-zwave_js-node-statistics.ts Co-authored-by: Bram Kragten <[email protected]>
src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-node-statistics.ts
Outdated
Show resolved
Hide resolved
src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-node-statistics.ts
Outdated
Show resolved
Hide resolved
…log-zwave_js-node-statistics.ts Co-authored-by: Bram Kragten <[email protected]>
…log-zwave_js-node-statistics.ts Co-authored-by: Bram Kragten <[email protected]>
Proposed change
Adds a new zwave_js device action to show device statistics. Dependent on home-assistant/core#72520
The screenshot below doesn't show that I split protocol and data rate into two separate rows
Looks like this:
![image](https://user-images.githubusercontent.com/7243222/170433558-c11748b5-2ef7-4f93-bbac-bd672c980c51.png)
Type of change
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: