From bf438488ca17c3dabadc67999870ecce907de0e1 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Tue, 1 Mar 2022 19:20:53 +0100 Subject: [PATCH] Switch TFA rain sensor value (#133) According to reports, these are expected to use the second rain total value too. --- RFXtrx/lowlevel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RFXtrx/lowlevel.py b/RFXtrx/lowlevel.py index 05da77c..30fc460 100644 --- a/RFXtrx/lowlevel.py +++ b/RFXtrx/lowlevel.py @@ -1694,7 +1694,8 @@ def load_receive(self, data): # cartridge can be 0.01 inch rather than 0.2mm self.raintotal = 0.2 * self.raintotal3 elif self.subtype == 9: - self.raintotal = 0.254 * self.raintotal3 + self.raintotal = 0.254 * float((self.raintotal2 << 8) + + self.raintotal3) self.rssi_byte = data[11] self.battery = self.rssi_byte & 0x0f