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:
![grafik](https://private-user-images.githubusercontent.com/120182236/290534845-061d12aa-bf79-4b69-b55c-9f91e612813e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU0MTYyMDIsIm5iZiI6MTcyNTQxNTkwMiwicGF0aCI6Ii8xMjAxODIyMzYvMjkwNTM0ODQ1LTA2MWQxMmFhLWJmNzktNGI2OS1iNTVjLTlmOTFlNjEyODEzZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTA0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwNFQwMjExNDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00ZDI1MDcxYmFiN2E0MzQ4ZTAyYzE3MmNhYmQ1ODQwOTdlMjI0YTk0ODI3MTdlNzllMmM1MDAyNjEwNDI4YWYzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.oZrWIpzCT9hridZvW2t3x7FYDswYeRurJrO5pbDk6eQ)
Versions:
The text was updated successfully, but these errors were encountered: