Add opt-in toggle for zwave-js telemetry to config panel#8958
Conversation
Our "template" text is probably a bit long: https://zwave-js.github.io/node-zwave-js/#/data-collection/user-disclosure
|
|
Posting here for visibility - there's three states: no preference specified (parameter value of null), opted out (false), and opted in (true). I think we wanted those to be distinct in the UI |
|
Currently, the toggle switch will always show the current state (if telemetry is no-preference or disabled in HA, but someone uses zwjs2mqtt and enabled it there, the toggle will show on). Toggling the switch on or off in HA will always set the setting in HA to the state of the switch and enable or disable on the server. |
@MartinHjelmare FYI ^ |
|
That sounds good and in accordance to what we've discussed I think. Right, @raman325? Ie, the three states are still working as planned in the backend, even if the user will only see two states. |
|
It's slightly different, but arguably better. In the case of using zwavejs2mqtt, I can opt in on the server side and then never provide a preference in HA, and it will always show as enabled because z2m will enable statistics on startup (so the only thing a user can do within HA in this scenario is opt out). The downside to this approach is that for those users, we will not be able to share the HA version being used |
BTW just rereading this - if the user explicitly opts out, HA will disable statistics on startup, so the flag will show as off. |
|
If the user opts out and then opts in again, it will activate Home Assistant version reporting, right? All in all, it's ok I think. Any other thoughts or change suggestions? |
That's correct, and I agree. Just wanted to make sure you saw it since we were discussing it |
We want to avoid having to keep track of the details of the data collection metrics here in the Home Assistant frontend, so we won't add 1. at this time. We have added 2. |
Proposed change
Add a card with toggle switch for opting into the Z-Wave JS data collection/telemetry. Open to suggestions on better wording for the card. There was some talk on Discord in #devs_zwave about not making it translatable, so I haven't done translations, but happy to change that if desired.
Backend PR has been merged.
Type of change
Checklist
If user exposed functionality or configuration variables are added/changed: