From def37519d4575299d7e25832b1cee0582666aa79 Mon Sep 17 00:00:00 2001 From: "Beaugrand, Kevin" Date: Sun, 7 Nov 2021 19:02:02 +0100 Subject: [PATCH] Fix Disposable Battery Voltage value of Vaqao --- src/modules/WattecoDecoderModule/main.py | 3 +++ src/modules/WattecoDecoderModule/test_main.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/WattecoDecoderModule/main.py b/src/modules/WattecoDecoderModule/main.py index fe41d19..b05207f 100644 --- a/src/modules/WattecoDecoderModule/main.py +++ b/src/modules/WattecoDecoderModule/main.py @@ -325,4 +325,7 @@ def VAQAOPlusDecoder(devEUI: str, payload: str, fport: int): if 'RelativeHumidity' in result: result['RelativeHumidity'] = result['RelativeHumidity'] / 100 + if 'Configuration' in result and 'DisposableBatteryVoltage' in result['Configuration']: + result['Configuration']['DisposableBatteryVoltage'] = result['Configuration']['DisposableBatteryVoltage'] / 1000 + return result diff --git a/src/modules/WattecoDecoderModule/test_main.py b/src/modules/WattecoDecoderModule/test_main.py index cb29f76..7dfa12f 100644 --- a/src/modules/WattecoDecoderModule/test_main.py +++ b/src/modules/WattecoDecoderModule/test_main.py @@ -30,7 +30,7 @@ def test_vaqaoplus(): 'Configuration': { "CurrentPowerMode": "PeriodicallyON", "AvailablePowerSourceBitField": 4, - "DisposableBatteryVoltage": 3094, + "DisposableBatteryVoltage": 3.094, "CurrentPowerSource": "DisposableBattery" } }