Closed marcelveldt closed 2 weeks ago
Is this command exposed through core?
No, either we need to add the default value to the metadata object in the zwave_js/get_config_parameters
websocket command, or we need to add a new command that calls the reset driver command:
The first way is the least amount of work in core, but the latter may be a bit more "correct".
No, either we need to add the default value to the metadata object in the
zwave_js/get_config_parameters
websocket command, or we need to add a new command that calls the reset driver command:
- https://github.com/home-assistant/core/blob/70966c2b63a34478576d0cef5899d75b39e7b2f0/homeassistant/components/zwave_js/api.py#L1685-L1716
- https://zwave-js.github.io/node-zwave-js/#/api/CCs/Configuration?id=reset
The first way is the least amount of work in core, but the latter may be a bit more "correct".
We would need a lot of api calls when we do it with zwave_js/set_config_parameter
instead of resetAll
You forward it in the backend to zwave_js right? So when both frontend and backend use resetAll it would be the way to go in my opinion.
I would like you to provide us a zwave_js/reset_all_config_parameters
or something like this.
Sounds good.
And we should do both changes, since I think Dominic said that we need to show the default value to the user.
We should definitely use resetAll
, not reset the parameters manually.
In the frontend panel where you can set device config values, there should be a way/button to reset all values to the default. The driver exposes a command to perform this action:
https://zwave-js.github.io/node-zwave-js/#/api/CCs/Configuration?id=resetall