Unset device settings value

Is it not possible to unset (delete) a key/value in device settings? Only finds methods for adding and changing values.

Did you try setting a value of null for the one you want to delete?

Have tried that, but it doesn’t work. Key still remains (with value null).
Can’t understand why Athom have implemented device settings methods different than for device store?

What issue are you trying to solve?

I have made a total rework of my App, Vanderbilt SPC, and have renamed and added some keys in the device settings. To be backward compatible and allow the users to upgrade, without re-pairing the devices, I convert the settings from old to new format on first onInit() after upgrade.
But it’s not a big issue, it just would have been nice to get rid of the old settings after conversion.

If the settings are defined in driver JSON (with initial value), they will be added if not existing. You can’t delete them in that case, only change.
So I would assume/hope they will be deleted if you delete them from the JSON in (one of the) the app updates.

Users will need to update to your new cersion for the migration and not directly to one of the next versions where the settings are not present.

Actually, I can’t see that the settings definition in the JSON file (driver.settings.compose.json) have any affect on the stored driver settings. It seems only be used for configuration and design of the Settings Page. Or have I missed something?

You can be right. Perhaps the default value is used on pairing (to set initial values) or on showing of settings dialog.