[deconz] Update the roller shutter status (#14827)

* [deconz] update the roller shutter status (14826)

- if the REST interface from deconz provides a 'lift' value to show
the current position of the roller shutter, it will be used. 

Signed-off-by: Daniel Zainzinger <dza1@mailbox.org>
This commit is contained in:
dza1 2023-04-20 22:22:38 +02:00 committed by GitHub
parent 5ed52d7109
commit 6436cdffb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -395,7 +395,12 @@ public class LightThingHandler extends DeconzBaseThingHandler {
updateState(channelUID, new DecimalType(miredToKelvin(ct))); updateState(channelUID, new DecimalType(miredToKelvin(ct)));
} }
} }
case CHANNEL_POSITION -> updatePercentTypeChannel(channelUID, newState.bri, true); // always post value case CHANNEL_POSITION -> {
Integer lift = newState.lift;
if (lift != null) {
updateState(channelUID, new PercentType(lift));
}
}
case CHANNEL_EFFECT -> updateStringChannel(channelUID, newState.effect); case CHANNEL_EFFECT -> updateStringChannel(channelUID, newState.effect);
case CHANNEL_EFFECT_SPEED -> updateDecimalTypeChannel(channelUID, newState.effectSpeed); case CHANNEL_EFFECT_SPEED -> updateDecimalTypeChannel(channelUID, newState.effectSpeed);
} }

View File

@ -4,7 +4,7 @@
"r": "lights", "r": "lights",
"state": { "state": {
"alert": null, "alert": null,
"bri": 102, "lift": 41,
"on": true, "on": true,
"reachable": true "reachable": true
}, },