add AddSettings
add AddSettings

This dbus method call allows to add multiple settings at once which
saves some roundtrips if there are many settings like the gui has.
Unlike the AddSetting, it doesn't make a distinction between groups
and setting and only accepts a single path. The type is based on the
default value and doesn't need to be passed. min, max and silent
are optional.

For each entry, at least error and path are returned (unless it
wasn't passed). The actual value is returned when no error occured.

e.g.:

dbus com.victronenergy.settings / AddSettings \
'%[{"path": "/Settings/Test", "default": 5}, {"path": "/Settings/Float", "default": 5.0}]'

[{'error': 0, 'path': '/Settings/Test', 'value': 1},
 {'error': 0, 'path': '/Settings/Float', 'value': 5.0}]

or on /Settings:

dbus com.victronenergy.settings /Settings AddSettings \
'%[{"path": "Test", "default": 5}, {"path": "Float", "default": 5.0}]'

[{'error': 0, 'path': 'Test', 'value': 1},
 {'error': 0, 'path': 'Float', 'value': 5.0}]

or for testing:

dbus com.victronenergy.settings /Settings/Devices AddSettings '%[{"path": "a/ClassAndVrmInstance", "default": "battery:1"}, {"path": "b/ClassAndVrmInstance", "default": "battery:1"}]'
[{'error': 0, 'path': 'a/ClassAndVrmInstance', 'value': 'battery:1'},
 {'error': 0, 'path': 'b/ClassAndVrmInstance', 'value': 'battery:2'}

victronenergy/localsettings