From 78fd621ad98e767bf44b7a513fda87cef69db082 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Fri, 7 Jan 2022 21:31:59 +0100 Subject: [PATCH] Use standard firmware property constant. (#11989) Signed-off-by: Jacob Laursen --- .../hdpowerview/internal/HDPowerViewBindingConstants.java | 3 --- .../hdpowerview/internal/handler/HDPowerViewHubHandler.java | 2 +- .../hdpowerview/internal/handler/HDPowerViewShadeHandler.java | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/HDPowerViewBindingConstants.java b/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/HDPowerViewBindingConstants.java index 6038a6cd6..2cc896261 100644 --- a/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/HDPowerViewBindingConstants.java +++ b/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/HDPowerViewBindingConstants.java @@ -58,9 +58,6 @@ public class HDPowerViewBindingConstants { public static final String PROPERTY_FIRMWARE_NAME = "firmwareName"; public static final String PROPERTY_RADIO_FIRMWARE_VERSION = "radioFirmwareVersion"; - // Hub/shade properties - public static final String PROPERTY_FIRMWARE_VERSION = "firmwareVersion"; - // Shade properties public static final String PROPERTY_SHADE_TYPE = "type"; public static final String PROPERTY_SHADE_CAPABILITIES = "capabilities"; diff --git a/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/handler/HDPowerViewHubHandler.java b/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/handler/HDPowerViewHubHandler.java index 14d497156..29155cd04 100644 --- a/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/handler/HDPowerViewHubHandler.java +++ b/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/handler/HDPowerViewHubHandler.java @@ -302,7 +302,7 @@ public class HDPowerViewHubHandler extends BaseBridgeHandler { if (mainProcessor.name != null) { properties.put(HDPowerViewBindingConstants.PROPERTY_FIRMWARE_NAME, mainProcessor.name); } - properties.put(HDPowerViewBindingConstants.PROPERTY_FIRMWARE_VERSION, mainProcessor.toString()); + properties.put(Thing.PROPERTY_FIRMWARE_VERSION, mainProcessor.toString()); Firmware radio = firmwareVersion.firmware.radio; if (radio != null) { logger.debug("Radio firmware version received: {}", radio.toString()); diff --git a/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/handler/HDPowerViewShadeHandler.java b/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/handler/HDPowerViewShadeHandler.java index fe9c2ffab..f3b2705c1 100644 --- a/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/handler/HDPowerViewShadeHandler.java +++ b/bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/handler/HDPowerViewShadeHandler.java @@ -249,7 +249,7 @@ public class HDPowerViewShadeHandler extends AbstractHubbedThingHandler { Firmware shadeFirmware = shadeData.firmware; Firmware motorFirmware = shadeData.motor; if (shadeFirmware != null) { - properties.put(PROPERTY_FIRMWARE_VERSION, shadeFirmware.toString()); + properties.put(Thing.PROPERTY_FIRMWARE_VERSION, shadeFirmware.toString()); } if (motorFirmware != null) { properties.put(PROPERTY_MOTOR_FIRMWARE_VERSION, motorFirmware.toString());