Skip to content

Commit

Permalink
playing with tag values
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Fiddian-Green <[email protected]>
  • Loading branch information
andrewfg committed Feb 28, 2025
1 parent 588582a commit 69506eb
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,6 @@ private void updateThingFromLegacy() {
* For lights use the product archetype to split between light bulbs and strip lights. Rooms and Zones are
* considered to be (groups of) light bulbs.
*/
// TODO use the semantic tag constants from OH core
private void updateSemanticEquipmentTag() {
// TODO SemanticTag semanticEquipmentTag = null;
String semanticEquipmentTag = null;
Expand All @@ -1437,26 +1436,26 @@ private void updateSemanticEquipmentTag() {

// security equipment
if (supportedChannelIdSet.contains(CHANNEL_2_SECURITY_CONTACT)) {
// TODO semanticEquipmentTag = o.o.c.semantics.model.DefaultSemanticTags.Equipment.ALARM_SYSTEM
semanticEquipmentTag = "Security";
// TODO semanticEquipmentTag = o.o.c.semantics.model.DefaultSemanticTags.Equipment.ALARM_DEVICE ** TBD **
semanticEquipmentTag = "AlarmDevice";
} else

// button equipment
if (supportedChannelIdSet.contains(CHANNEL_2_BUTTON_LAST_EVENT)) {
// TODO semanticEquipmentTag = o.o.c.semantics.model.DefaultSemanticTags.Equipment.WALL_SWITCH
semanticEquipmentTag = "Button";
semanticEquipmentTag = "WallSwitch";
} else

// rotary dial equipment
if (supportedChannelIdSet.contains(CHANNEL_2_ROTARY_STEPS)) {
// TODO semanticEquipmentTag = o.o.c.semantics.model.DefaultSemanticTags.Equipment.TBD **
// TODO semanticEquipmentTag = o.o.c.semantics.model.DefaultSemanticTags.Equipment.WALL_DEVICE ** TBD **
semanticEquipmentTag = "RotaryDial";
} else

// rooms and zones are a super-set of light bulb equipment
if (thisResource.getType() != ResourceType.DEVICE) {
// TODO semanticEquipmentTag = o.o.c.semantics.model.DefaultSemanticTags.Equipment.LIGHTBULB
semanticEquipmentTag = "LightBulb";
// TODO semanticEquipmentTag = o.o.c.semantics.model.DefaultSemanticTags.Equipment.LIGHTING ** TBD **
semanticEquipmentTag = "Lighting";
} else

// everything else is individual light equipment
Expand All @@ -1465,7 +1464,7 @@ private void updateSemanticEquipmentTag() {
// TODO semanticEquipmentTag = o.o.c.semantics.model.DefaultSemanticTags.Equipment.LIGHT_STRIPE
semanticEquipmentTag = "LightStrip";
} else {
// TODO semanticEquipmentTag = o.o.c.semantics.model.DefaultSemanticTags.Equipment.LIGHTBULB
// TODO semanticEquipmentTag = o.o.c.semantics.model.DefaultSemanticTags.Equipment.LIGHT_BULB ** TBD **
semanticEquipmentTag = "LightBulb";
}
}
Expand Down

0 comments on commit 69506eb

Please sign in to comment.