From ad18ac2ed86bed8856d515508983aed1df4e64f3 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Fri, 3 Sep 2021 23:36:19 +0200 Subject: [PATCH] Fix channel lowBattery being updated to ON when no battery status available. Fixes #11200 Signed-off-by: Jacob Laursen --- .../hdpowerview/internal/handler/HDPowerViewShadeHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 bacd143f62488..2403e76122716 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 @@ -136,7 +136,7 @@ protected void onReceiveUpdate(@Nullable ShadeData shadeData) { if (shadeData != null) { updateStatus(ThingStatus.ONLINE); updateBindingStates(shadeData.positions); - updateState(CHANNEL_SHADE_LOW_BATTERY, shadeData.batteryStatus < 2 ? OnOffType.ON : OnOffType.OFF); + updateState(CHANNEL_SHADE_LOW_BATTERY, shadeData.batteryStatus == 1 ? OnOffType.ON : OnOffType.OFF); updateState(CHANNEL_SHADE_BATTERY_VOLTAGE, new QuantityType<>(shadeData.batteryStrength / 10, Units.VOLT)); } else { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR);