From da9c34b13c476f4fa5ee99a5cdacb5b85ff808db Mon Sep 17 00:00:00 2001 From: lolodomo Date: Mon, 4 Apr 2022 23:45:55 +0200 Subject: [PATCH] [km200] Cleanup semantic tags (#12573) Related to #12262 Signed-off-by: Laurent Garnier --- .../internal/handler/KM200ThingHandler.java | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/bundles/org.openhab.binding.km200/src/main/java/org/openhab/binding/km200/internal/handler/KM200ThingHandler.java b/bundles/org.openhab.binding.km200/src/main/java/org/openhab/binding/km200/internal/handler/KM200ThingHandler.java index 36b18f30f..11ceeb3a7 100644 --- a/bundles/org.openhab.binding.km200/src/main/java/org/openhab/binding/km200/internal/handler/KM200ThingHandler.java +++ b/bundles/org.openhab.binding.km200/src/main/java/org/openhab/binding/km200/internal/handler/KM200ThingHandler.java @@ -21,7 +21,6 @@ import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -108,23 +107,6 @@ public class KM200ThingHandler extends BaseThingHandler { } } - /** - * Choose a tag for a channel - */ - Set checkTags(String unitOfMeasure, @Nullable Boolean readOnly) { - Set tags = new HashSet<>(); - if (unitOfMeasure.indexOf("°C") == 0 || unitOfMeasure.indexOf("K") == 0) { - if (null != readOnly) { - if (readOnly) { - tags.add("CurrentTemperature"); - } else { - tags.add("TargetTemperature"); - } - } - } - return tags; - } - /** * Choose a category for a channel */ @@ -188,7 +170,6 @@ public class KM200ThingHandler extends BaseThingHandler { channelType = ChannelTypeBuilder.state(channelTypeUID, label, itemType) // .withDescription(description) // .withCategory(checkCategory(unitOfMeasure, category, state.isReadOnly())) // - .withTags(checkTags(unitOfMeasure, state.isReadOnly())) // .withStateDescriptionFragment(state) // .withConfigDescriptionURI(configDescriptionUriChannel).build(); } catch (URISyntaxException ex) { @@ -196,8 +177,7 @@ public class KM200ThingHandler extends BaseThingHandler { CONFIG_DESCRIPTION_URI_CHANNEL); channelType = ChannelTypeBuilder.state(channelTypeUID, label, itemType) // .withDescription(description) // - .withCategory(checkCategory(unitOfMeasure, category, state.isReadOnly())) // - .withTags(checkTags(unitOfMeasure, state.isReadOnly())).build(); + .withCategory(checkCategory(unitOfMeasure, category, state.isReadOnly())).build(); } channelTypeProvider.addChannelType(channelType);