deconz-rest-plugin: Yooksmart (Yoolax) D10110 roller shade - Lift percentage is reported incorrectly (reversed)
Describe the bug

This roller shade ๐(Amazon link) is having its lift percentage incorrectly reported by the REST API. The value reported is opposite of the expected value.
Fully open should be "lift": 0, but is reported as "lift": 100.
Fully closed should be "lift": 100, but is reported as "lift": 0.
10% closed should be "lift": 10, but is reported as "lift": 90.
90% closed should be "lift": 90, but is reported as "lift": 11.
Controls all work as expected, just the lift is reported incorrectly.
Steps to reproduce the behavior
Control the device. Query the REST API. Review the JSON. Observe the โliftโ value is opposite of the expected value.
Expected behavior
Correct reporting of lift percentage from the REST APi.
Screenshots
Fully Open:

{
"etag": "ce361ccec9fddea1596987b92a95aab0",
"hascolor": false,
"lastannounced": null,
"lastseen": "2021-11-04T20:45Z",
"manufacturername": "yooksmart",
"modelid": "D10110",
"name": "South Window Shade",
"state": {
"bri": 254,
"lift": 100,
"on": true,
"open": false,
"reachable": true
},
"swversion": "20201120",
"type": "Window covering device",
"uniqueid": "8c:f6:81:ff:fe:de:c1:a1-01"
}
Fully Closed:

{
"etag": "f4d78394e3c2e0dbab8f4ba4f57579f7",
"hascolor": false,
"lastannounced": null,
"lastseen": "2021-11-04T20:47Z",
"manufacturername": "yooksmart",
"modelid": "D10110",
"name": "South Window Shade",
"state": {
"bri": 0,
"lift": 0,
"on": false,
"open": true,
"reachable": true
},
"swversion": "20201120",
"type": "Window covering device",
"uniqueid": "8c:f6:81:ff:fe:de:c1:a1-01"
}
10% Closed:

{
"etag": "32def84048c1357f2881c21f477bef28",
"hascolor": false,
"lastannounced": null,
"lastseen": "2021-11-04T20:58Z",
"manufacturername": "yooksmart",
"modelid": "D10110",
"name": "South Window Shade",
"state": {
"bri": 228,
"lift": 90,
"on": true,
"open": true,
"reachable": true
},
"swversion": "20201120",
"type": "Window covering device",
"uniqueid": "8c:f6:81:ff:fe:de:c1:a1-01"
}
90% Closed:

{
"etag": "ef5470b21f8f7eb00fe317d9a0097007",
"hascolor": false,
"lastannounced": null,
"lastseen": "2021-11-04T21:00Z",
"manufacturername": "yooksmart",
"modelid": "D10110",
"name": "South Window Shade",
"state": {
"bri": 27,
"lift": 11,
"on": true,
"open": true,
"reachable": true
},
"swversion": "20201120",
"type": "Window covering device",
"uniqueid": "8c:f6:81:ff:fe:de:c1:a1-01"
}
Environment
- Host system: Raspberry Pi
- Running method: Raspbian
- Firmware version: 26400500
- deCONZ version: (2.13.01)
- Device: RaspBee I
- Is there any other USB or serial devices connected to the host system? USB mouse and keyboard
deCONZ Logs
Additional context
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 57
Yep was the state/bri by defaut for bulbs, your device donโt use the Cluster 0x0008
and for state/bri the expression is
Item.val = 255 - Attr.val * 254 / 100In reality this is deprecated, we need to avoid bri and on and use only lift and open. But it s for test, will remove it later.
Please also check if you have the โTuya specific Clusterโ.
Makes sense.
Lets wait what @Smanar brings to the table ๐