@@ -2483,6 +2483,52 @@ def test_Xiaomi_MS1BB_MI_obj4a13():
2483
2483
)
2484
2484
2485
2485
2486
+ def test_Xiaomi_RS1BB_MI_obj4806 ():
2487
+ """Test Xiaomi parser for Linptech RS1BB(MI) with obj4806."""
2488
+ data_string = b"XY\x0f ?JgL\xb9 8\xc1 \xa4 \xd6 \xe5 {\x83 \x04 \x00 \x00 \xd0 \x1e \x0b K"
2489
+ advertisement = bytes_to_service_info (data_string , address = "A4:C1:38:B9:4C:67" )
2490
+ bindkey = "33ede53321bc73c790a8daae4581f3d5"
2491
+
2492
+ device = XiaomiBluetoothDeviceData (bindkey = bytes .fromhex (bindkey ))
2493
+ assert device .supported (advertisement )
2494
+ assert device .bindkey_verified
2495
+ assert device .update (advertisement ) == SensorUpdate (
2496
+ title = "Flood and Rain Sensor 4C67 (RS1BB(MI))" ,
2497
+ devices = {
2498
+ None : SensorDeviceInfo (
2499
+ name = "Flood and Rain Sensor 4C67" ,
2500
+ manufacturer = "Xiaomi" ,
2501
+ model = "RS1BB(MI)" ,
2502
+ hw_version = None ,
2503
+ sw_version = "Xiaomi (MiBeacon V5 encrypted)" ,
2504
+ )
2505
+ },
2506
+ entity_descriptions = {
2507
+ KEY_SIGNAL_STRENGTH : SensorDescription (
2508
+ device_key = KEY_SIGNAL_STRENGTH ,
2509
+ device_class = DeviceClass .SIGNAL_STRENGTH ,
2510
+ native_unit_of_measurement = "dBm" ,
2511
+ ),
2512
+ },
2513
+ entity_values = {
2514
+ KEY_SIGNAL_STRENGTH : SensorValue (
2515
+ name = "Signal Strength" , device_key = KEY_SIGNAL_STRENGTH , native_value = - 60
2516
+ ),
2517
+ },
2518
+ binary_entity_descriptions = {
2519
+ KEY_MOISTURE : BinarySensorDescription (
2520
+ device_key = KEY_MOISTURE ,
2521
+ device_class = BinarySensorDeviceClass .MOISTURE ,
2522
+ ),
2523
+ },
2524
+ binary_entity_values = {
2525
+ KEY_MOISTURE : BinarySensorValue (
2526
+ name = "Moisture" , device_key = KEY_MOISTURE , native_value = False
2527
+ ),
2528
+ },
2529
+ )
2530
+
2531
+
2486
2532
def test_Xiaomi_XMWXKG01YL ():
2487
2533
"""Test Xiaomi parser for XMWXKG01YL Switch (double button)."""
2488
2534
data_string = b"XYI\x19 Os\x12 \x87 \x83 \xed \xdc \x0b 48\n \x02 \x00 \x00 \x8d I\xae ("
0 commit comments