ioBroker.socketio icon indicating copy to clipboard operation
ioBroker.socketio copied to clipboard

wildcards not working in ID array

Open fm0609 opened this issue 2 years ago • 3 comments

From the readme file:

getStates function (IDs, callback) get the states of more than one state. This command normally is called after the connection is established to get the actual states of used data points.

IDs - pattern or array with IDs. Could be omitted to get all states. Patterns could have wildcards, like: '.STATE', 'haa.0.' callback - function (error, states) {} - states is object like {'id1': 'state1', 'id2': 'state2', ...}. stateX are objects with the structure described above.

Problem: Wildcards are only possible using a single id like: ids= 'bshb.0.*.RoomClimateControl.setpointTemperature';

Using several ids in an array, wildcards don't work: ids = [ 'bshb.0.', 'hue-extended.0.'];

fm0609 avatar Feb 22 '23 11:02 fm0609

In general "yes this is the current intended behavior". You can provide ONE pattern string OR a list of concrete State IDs. SO this is a feature request tp also support a list of patterns

Apollon77 avatar Feb 22 '23 14:02 Apollon77

Thanks for the reply. So, this enhancement would be great. Have my walkaround with a loop and object.assign.

fm0609 avatar Feb 22 '23 15:02 fm0609

If it wopuld be great then let it open :-)

Apollon77 avatar Feb 22 '23 16:02 Apollon77