home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.94k stars 29.03k forks source link

Z-Wave JS: meter_reset service call issues the reset command multiple times, does not refresh values #116222

Open AlCalzone opened 2 months ago

AlCalzone commented 2 months ago

The problem

When using the service call UI to reset the meters of a Z-Wave node (the node was chosen as the target), the reset API is called multiple times, seemingly once for each meter. This causes multiple identical commands to be queued.

Also, the underlying meter values aren't updated as a result when Supervision is not used and the device sends no unsolicited report. Unless a specific value to reset to is given, I think it would be better to write to the resetAll or resetSingle values, because that also refreshes the values if necessary - unlike the reset() API call.

What version of Home Assistant Core has the issue?

core-2024.1.0.dev20231211

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Z-Wave JS

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 months ago

Hey there @home-assistant/z-wave, mind taking a look at this issue as it has been labeled with an integration (zwave_js) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `zwave_js` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign zwave_js` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


zwave_js documentation zwave_js source (message by IssueLinks)

AlCalzone commented 1 month ago

Update: I found some discrepancies from the specs, which mean the reset calls will need an overhaul anyways: https://github.com/zwave-js/node-zwave-js/pull/6921