Use standard firmware property constant. (#11989)

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen 2022-01-07 21:31:59 +01:00 committed by GitHub
parent 6f555cb0af
commit 78fd621ad9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View File

@ -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";

View File

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

View File

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