Skip to content

Commit

Permalink
Use standard firmware property constant. (openhab#11989)
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Michael Schmidt <[email protected]>
  • Loading branch information
jlaur authored and mischmidt83 committed Jan 9, 2022
1 parent 6c44d34 commit 4fe506a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ private void updateFirmwareProperties() throws JsonParseException, HubProcessing
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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ private void updateFirmwareProperties(ShadeData shadeData) {
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());
Expand Down

0 comments on commit 4fe506a

Please sign in to comment.