You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
the datapoints selectInput and surroundMode are from type string, but the have a state list. If you change the datapoint via admin, you get the list and choose one. Here the number of List (key) is set to Datapoint. In the readme you say also, set the key:
Beispiel:
setState('denon.0.zoneMain.selectInput', '5'); // Selects TV as input for Main Zone
But in you code you set the string:
} else if (/^Z\d.*/g.test(command)) {
// Encode Input Source
const obj = await adapter.getObjectAsync('zoneMain.selectInput');
let zoneSi = data.substring(2);
zoneSi = zoneSi.replace(' ', ''); // Remove blank
for (const j of Object.keys(obj!.common.states)) {
// Check if command contains one of the possible Select Inputs
if (helper.decodeState(obj!.common.states, j.toString()) === zoneSi) {
ensureAttrInStates(`zone${zoneNumber}.selectInput`, zoneSi);
adapter.setState(`zone${zoneNumber}.selectInput`, zoneSi, true);
return;
So, I think, here you have to set the key instead.
A possibility could be, to return in ensureAttrInStates the index and use them in setState
The reason, why I asked to do this is because I want to use it in iQontrol and this uses a State list as selectbox, but if the "key" not found, it shows only the string.
To Reproduce
Steps to reproduce the behavior:
change input on device and check the datapoint in iobroker admin
change the input in admin to see, how it is stored than
Expected behavior
the datapoint is set with key instead of value
Screenshots & Logfiles
The text was updated successfully, but these errors were encountered:
The problem is, that the value which is sent back from the AVR is often not one of the list, thus this datapoint woudl need to be split in two dps. It is a bit historically grown unfortunately.
Describe the bug
the datapoints selectInput and surroundMode are from type string, but the have a state list. If you change the datapoint via admin, you get the list and choose one. Here the number of List (key) is set to Datapoint. In the readme you say also, set the key:
But in you code you set the string:
So, I think, here you have to set the key instead.
A possibility could be, to return in ensureAttrInStates the index and use them in setState
The reason, why I asked to do this is because I want to use it in iQontrol and this uses a State list as selectbox, but if the "key" not found, it shows only the string.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
the datapoint is set with key instead of value
Screenshots & Logfiles
The text was updated successfully, but these errors were encountered: