[hueemulation] Fixed nullpointer in adjustedColorStateFromItemState (#8560)

Signed-off-by: Nicolai Grødum <grodum@gmail.com>
pull/8564/head
Nicolai Grødum 2020-09-23 20:20:20 +02:00 committed by GitHub
parent cafa8fdcff
commit 9c16f3c6f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -450,7 +450,8 @@ public class StateUtils {
}
}
} else if (lastCommand instanceof PercentType) {
if (hueState instanceof HueStateBulb && itemState.as(PercentType.class).equals(lastCommand)) {
if (hueState instanceof HueStateBulb && itemState != null
&& lastCommand.equals(itemState.as(PercentType.class))) {
if (lastHueChange.bri != null) {
((HueStateBulb) hueState).bri = lastHueChange.bri;
}