From bb383c717c60f4df3fe658343989b9563e0f40f9 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Sun, 8 Dec 2024 09:02:17 -0700 Subject: [PATCH 1/2] [wiz] Correct units for RSSI Number:Power of dBm, instead of Number:Dimensionless of dB. See discussion in #17826 Signed-off-by: Cody Cutrer --- .../org/openhab/binding/wiz/internal/handler/WizHandler.java | 2 +- .../src/main/resources/OH-INF/thing/thing-types.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 1b91a47ebf7f0..f6108051c2f1f 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 @@ private synchronized void updateStatesFromParams(final WizSyncState receivedPara 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 9b6b103643dc4..28a6a282848f3 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 @@ -185,7 +185,7 @@ - Number:Dimensionless + Number:Power WiFi Received Signal Strength Indicator QualityOfService From 593c3a3180731e8c5bfa22cc00af26b870ef42b1 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Tue, 10 Dec 2024 13:02:56 -0700 Subject: [PATCH 2/2] add update instructions Signed-off-by: Cody Cutrer --- .../resources/OH-INF/thing/thing-types.xml | 18 +++++++ .../resources/OH-INF/update/instructions.xml | 54 +++++++++++++++++++ 2 files changed, 72 insertions(+) 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/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.wiz/src/main/resources/OH-INF/thing/thing-types.xml index 28a6a282848f3..a5e1c78a64025 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 + 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 0000000000000..febf38265f659 --- /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 + + + + +