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 "bri_inc" command does not work correctly.
I have tested with the debugger.
Permitted values here are -254 to 254.
Let's assume that we are currently at a brightness of 100. If I send a "bri_inc": 254, I get a response "success": {"/lights/7/state/bri": 254}. This means it is limited.
However, if I send with the HUE adapter, it turns it into 99, so it is incremented in the cycle. Both when incrementing and decrementing.
The second problem is the decrements.
Let's assume again that we are currently at a brightness of 100.
If I send a "bri_inc": -254, I get a response "success": {"/lights/7/state/bri": 0}. In other words, there is also a limit here.
However, the lights are only dimmed to 1, the first response with bri: 0 is followed by a response with bri: 1
The first response may also result in the HUE Adapter error "Error: Value, '0' is not within allowed limits: min=1 max=254 for 'bri' at UInt8Type"
Expected behavior
If I stay within the brightness of 1-254 with the increments, everything is ok. If I get outside these values, limit it instead of putting it into circulation.
No error with response brightness 0 in this case.
Screenshots & Logfiles
Error: Value, '0' is not within allowed limits: min=1 max=254 for 'bri' at UInt8Type.getValue (/opt/iobroker/node_modules/node-hue-api/lib/types/RangedNumberType.js:40:13) at LightState._setStateValue (/opt/iobroker/node_modules/node-hue-api/lib/model/lightstate/States.js:87:53) at LightState.bri (/opt/iobroker/node_modules/node-hue-api/lib/model/lightstate/BaseStates.js:34:17) at Hue.onStateChange (/opt/iobroker/node_modules/iobroker.hue/build/main.js:644:37)
First response after negative value:
Versions:
Adapter version: 3.10.1
The text was updated successfully, but these errors were encountered:
Describe the bug
The "bri_inc" command does not work correctly.
I have tested with the debugger.
Permitted values here are -254 to 254.
Let's assume that we are currently at a brightness of 100. If I send a "bri_inc": 254, I get a response "success": {"/lights/7/state/bri": 254}. This means it is limited.
However, if I send with the HUE adapter, it turns it into 99, so it is incremented in the cycle. Both when incrementing and decrementing.
The second problem is the decrements.
Let's assume again that we are currently at a brightness of 100.
If I send a "bri_inc": -254, I get a response "success": {"/lights/7/state/bri": 0}. In other words, there is also a limit here.
However, the lights are only dimmed to 1, the first response with bri: 0 is followed by a response with bri: 1
The first response may also result in the HUE Adapter error "Error: Value, '0' is not within allowed limits: min=1 max=254 for 'bri' at UInt8Type"
Expected behavior
Screenshots & Logfiles
Error: Value, '0' is not within allowed limits: min=1 max=254 for 'bri' at UInt8Type.getValue (/opt/iobroker/node_modules/node-hue-api/lib/types/RangedNumberType.js:40:13) at LightState._setStateValue (/opt/iobroker/node_modules/node-hue-api/lib/model/lightstate/States.js:87:53) at LightState.bri (/opt/iobroker/node_modules/node-hue-api/lib/model/lightstate/BaseStates.js:34:17) at Hue.onStateChange (/opt/iobroker/node_modules/iobroker.hue/build/main.js:644:37)
First response after negative value:
Versions:
The text was updated successfully, but these errors were encountered: