add double temperature measurement
@@ -472,3 +472,20 @@ class TestBTHome:
assert sensor_msg["data"]
assert sensor_msg["temperature"] == 25.7
assert sensor_msg["rssi"] == -52
+
+ def test_bthome_v2_double_temperature(self):
+ """Test BTHome parser for double temperature measurement, which isn't supported (yet)"""
+ data_string = "043E1A02010000A5808FE648540E0201060A16D2FC40450101450301CC"
+ data = bytes(bytearray.fromhex(data_string))
+
+ # pylint: disable=unused-variable
+ ble_parser = BleParser()
+ sensor_msg, tracker_msg = ble_parser.parse_raw_data(data)
+
+ assert sensor_msg["firmware"] == "BTHome V2"
+ assert sensor_msg["type"] == "BTHome"
+ assert sensor_msg["mac"] == "5448E68F80A5"
+ assert sensor_msg["packet"] == "no packet id"
+ assert sensor_msg["data"]
+ assert sensor_msg["temperature"] == 25.7
+ assert sensor_msg["rssi"] == -52
