[hdpowerview-ble] fix prior PR (#18565)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>pull/18582/head
parent
b191f48824
commit
8fb2ab1310
|
@ -487,15 +487,15 @@ public class ShadeHandler extends BeaconBluetoothHandler {
|
|||
removeChannels.add(channel);
|
||||
}
|
||||
}
|
||||
boolean isDrape = ShadeCapabilitiesDatabase.DRAPES_TYPES.contains(dataReader.getTypeId());
|
||||
if (!removeChannels.isEmpty() || isDrape) {
|
||||
boolean isDrapes = ShadeCapabilitiesDatabase.DRAPES_TYPES.contains(dataReader.getTypeId());
|
||||
if (isDrapes || !removeChannels.isEmpty()) {
|
||||
ThingBuilder thingBuilder = editThing();
|
||||
if (isDrapes) {
|
||||
thingBuilder = thingBuilder.withSemanticEquipmentTag(Equipment.DRAPES);
|
||||
}
|
||||
if (!removeChannels.isEmpty()) {
|
||||
thingBuilder = thingBuilder.withoutChannels(removeChannels);
|
||||
}
|
||||
if (isDrape) {
|
||||
thingBuilder = thingBuilder.withSemanticEquipmentTag(Equipment.DRAPES);
|
||||
}
|
||||
updateThing(thingBuilder.build());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue