Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wildcards not working in ID array #145

Open
fm0609 opened this issue Feb 22, 2023 · 3 comments
Open

wildcards not working in ID array #145

fm0609 opened this issue Feb 22, 2023 · 3 comments

Comments

@fm0609
Copy link

fm0609 commented Feb 22, 2023

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.'];

@Apollon77
Copy link
Contributor

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

@fm0609
Copy link
Author

fm0609 commented Feb 22, 2023

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

@fm0609 fm0609 closed this as completed Feb 22, 2023
@Apollon77 Apollon77 reopened this Feb 22, 2023
@Apollon77
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants