[hdpowerview-ble] fix prior PR (#18565)

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
pull/18582/head
Andrew Fiddian-Green 2025-04-20 09:33:08 +01:00 committed by GitHub
parent b191f48824
commit 8fb2ab1310
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 5 deletions

View File

@ -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());
}
}