From 22dce4d6937b6827f6e09169b559cc93239675d7 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Wed, 11 Dec 2024 00:12:06 -0700 Subject: [PATCH] [wiz] Correct units for RSSI (#17867) Number:Power of dBm, instead of Number:Dimensionless of dB. Signed-off-by: Cody Cutrer Signed-off-by: Ciprian Pascu --- .../wiz/internal/handler/WizHandler.java | 2 +- .../resources/OH-INF/thing/thing-types.xml | 20 ++++++- .../resources/OH-INF/update/instructions.xml | 54 +++++++++++++++++++ 3 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 bundles/org.openhab.binding.wiz/src/main/resources/OH-INF/update/instructions.xml diff --git a/bundles/org.openhab.binding.wiz/src/main/java/org/openhab/binding/wiz/internal/handler/WizHandler.java b/bundles/org.openhab.binding.wiz/src/main/java/org/openhab/binding/wiz/internal/handler/WizHandler.java index 1b91a47ebf7..f6108051c2f 100644 --- a/bundles/org.openhab.binding.wiz/src/main/java/org/openhab/binding/wiz/internal/handler/WizHandler.java +++ b/bundles/org.openhab.binding.wiz/src/main/java/org/openhab/binding/wiz/internal/handler/WizHandler.java @@ -592,7 +592,7 @@ public class WizHandler extends BaseThingHandler { strength = 4; } updateDeviceState(CHANNEL_SIGNAL_STRENGTH, new DecimalType(strength)); - updateDeviceState(CHANNEL_RSSI, new QuantityType<>(receivedParam.rssi, Units.DECIBEL)); + updateDeviceState(CHANNEL_RSSI, new QuantityType<>(receivedParam.rssi, Units.DECIBEL_MILLIWATTS)); } } diff --git a/bundles/org.openhab.binding.wiz/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.wiz/src/main/resources/OH-INF/thing/thing-types.xml index 9b6b103643d..a5e1c78a640 100644 --- a/bundles/org.openhab.binding.wiz/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.wiz/src/main/resources/OH-INF/thing/thing-types.xml @@ -17,6 +17,9 @@ + + 1 + @@ -34,6 +37,9 @@ + + 1 + @@ -49,6 +55,9 @@ + + 1 + @@ -62,6 +71,9 @@ + + 1 + @@ -78,6 +90,9 @@ + + 1 + @@ -90,6 +105,9 @@ + + 1 + @@ -185,7 +203,7 @@ - Number:Dimensionless + Number:Power WiFi Received Signal Strength Indicator QualityOfService diff --git a/bundles/org.openhab.binding.wiz/src/main/resources/OH-INF/update/instructions.xml b/bundles/org.openhab.binding.wiz/src/main/resources/OH-INF/update/instructions.xml new file mode 100644 index 00000000000..febf38265f6 --- /dev/null +++ b/bundles/org.openhab.binding.wiz/src/main/resources/OH-INF/update/instructions.xml @@ -0,0 +1,54 @@ + + + + + + + wiz:rssi + + + + + + + + wiz:rssi + + + + + + + + wiz:rssi + + + + + + + + wiz:rssi + + + + + + + + wiz:rssi + + + + + + + + wiz:rssi + + + + +