Skip to content

Commit

Permalink
Fix Disposable Battery Voltage value of Vaqao
Browse files Browse the repository at this point in the history
  • Loading branch information
kbeaugrand committed Nov 7, 2021
1 parent df8174f commit def3751
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/modules/WattecoDecoderModule/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/modules/WattecoDecoderModule/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_vaqaoplus():
'Configuration': {
"CurrentPowerMode": "PeriodicallyON",
"AvailablePowerSourceBitField": 4,
"DisposableBatteryVoltage": 3094,
"DisposableBatteryVoltage": 3.094,
"CurrentPowerSource": "DisposableBattery"
}
}
Expand Down

0 comments on commit def3751

Please sign in to comment.