@@ -54,6 +54,7 @@ def test_parse_advertisement_data_curtain():
5454 },
5555 device = ble_device ,
5656 rssi = - 80 ,
57+ active = True ,
5758 )
5859
5960
@@ -85,8 +86,10 @@ def test_parse_advertisement_data_curtain_passive():
8586 },
8687 device = ble_device ,
8788 rssi = - 80 ,
89+ active = False ,
8890 )
8991
92+
9093def test_parse_advertisement_data_curtain_position_zero ():
9194 """Test parse_advertisement_data for curtain position zero."""
9295 ble_device = BLEDevice ("aa:bb:cc:dd:ee:ff" , "any" )
@@ -121,6 +124,7 @@ def test_parse_advertisement_data_curtain_position_zero():
121124 },
122125 device = ble_device ,
123126 rssi = - 52 ,
127+ active = True ,
124128 )
125129
126130
@@ -164,6 +168,7 @@ def test_parse_advertisement_data_curtain_firmware_six_position_100():
164168 },
165169 device = ble_device ,
166170 rssi = - 62 ,
171+ active = True ,
167172 )
168173
169174
@@ -207,6 +212,7 @@ def test_parse_advertisement_data_curtain_firmware_six_position_100_other_rssi()
207212 },
208213 device = ble_device ,
209214 rssi = - 67 ,
215+ active = True ,
210216 )
211217
212218
@@ -244,6 +250,7 @@ def test_parse_advertisement_data_curtain_fully_closed():
244250 },
245251 device = ble_device ,
246252 rssi = 1 ,
253+ active = True ,
247254 )
248255
249256
@@ -281,6 +288,7 @@ def test_parse_advertisement_data_curtain_fully_open():
281288 },
282289 device = ble_device ,
283290 rssi = 1 ,
291+ active = True ,
284292 )
285293
286294
@@ -315,6 +323,7 @@ def test_parse_advertisement_data_contact():
315323 },
316324 device = ble_device ,
317325 rssi = - 80 ,
326+ active = True ,
318327 )
319328
320329
@@ -351,6 +360,7 @@ def test_new_bot_firmware():
351360 },
352361 device = ble_device ,
353362 rssi = - 90 ,
363+ active = True ,
354364 )
355365
356366
@@ -394,6 +404,7 @@ def test_parse_advertisement_data_curtain_firmware_six_fully_closed():
394404 },
395405 device = ble_device ,
396406 rssi = - 2 ,
407+ active = True ,
397408 )
398409
399410
@@ -437,6 +448,7 @@ def test_parse_advertisement_data_curtain_firmware_six_fully_open():
437448 },
438449 device = ble_device ,
439450 rssi = - 2 ,
451+ active = True ,
440452 )
441453
442454
@@ -472,6 +484,7 @@ def test_contact_sensor_mfr():
472484 },
473485 device = ble_device ,
474486 rssi = - 70 ,
487+ active = True ,
475488 )
476489
477490
@@ -505,6 +518,7 @@ def test_contact_sensor_mfr_no_service_data():
505518 },
506519 device = ble_device ,
507520 rssi = - 70 ,
521+ active = False ,
508522 )
509523
510524
@@ -539,6 +553,7 @@ def test_contact_sensor_srv():
539553 },
540554 device = ble_device ,
541555 rssi = - 70 ,
556+ active = True ,
542557 )
543558
544559
@@ -574,6 +589,7 @@ def test_contact_sensor_open():
574589 },
575590 device = ble_device ,
576591 rssi = - 59 ,
592+ active = True ,
577593 )
578594
579595
@@ -609,6 +625,7 @@ def test_contact_sensor_closed():
609625 },
610626 device = ble_device ,
611627 rssi = - 50 ,
628+ active = True ,
612629 )
613630
614631
@@ -638,6 +655,7 @@ def test_switchbot_passive():
638655 },
639656 device = ble_device ,
640657 rssi = - 50 ,
658+ active = False ,
641659 )
642660
643661
@@ -672,6 +690,7 @@ def test_bulb_active():
672690 },
673691 device = ble_device ,
674692 rssi = - 50 ,
693+ active = True ,
675694 )
676695
677696
@@ -708,6 +727,7 @@ def test_lightstrip_passive():
708727 },
709728 device = ble_device ,
710729 rssi = - 50 ,
730+ active = False ,
711731 )
712732
713733
@@ -729,6 +749,7 @@ def test_wosensor_passive_and_active():
729749 "fahrenheit" : False ,
730750 "humidity" : 53 ,
731751 "temp" : {"c" : 24.6 , "f" : 76.28 },
752+ "temperature" : 24.6 ,
732753 },
733754 "isEncrypted" : False ,
734755 "model" : "T" ,
@@ -738,6 +759,7 @@ def test_wosensor_passive_and_active():
738759 },
739760 device = ble_device ,
740761 rssi = - 50 ,
762+ active = True ,
741763 )
742764
743765
@@ -759,6 +781,7 @@ def test_wosensor_active():
759781 "fahrenheit" : False ,
760782 "humidity" : 53 ,
761783 "temp" : {"c" : 24.6 , "f" : 76.28 },
784+ "temperature" : 24.6 ,
762785 },
763786 "isEncrypted" : False ,
764787 "model" : "T" ,
@@ -768,6 +791,7 @@ def test_wosensor_active():
768791 },
769792 device = ble_device ,
770793 rssi = - 50 ,
794+ active = True ,
771795 )
772796
773797
@@ -789,6 +813,7 @@ def test_wosensor_passive_only():
789813 "fahrenheit" : False ,
790814 "humidity" : 53 ,
791815 "temp" : {"c" : 24.6 , "f" : 76.28 },
816+ "temperature" : 24.6 ,
792817 },
793818 "isEncrypted" : False ,
794819 "model" : "T" ,
@@ -798,6 +823,7 @@ def test_wosensor_passive_only():
798823 },
799824 device = ble_device ,
800825 rssi = - 50 ,
826+ active = False ,
801827 )
802828
803829
@@ -834,6 +860,7 @@ def test_motion_sensor_clear():
834860 },
835861 device = ble_device ,
836862 rssi = - 87 ,
863+ active = True ,
837864 )
838865
839866
@@ -870,6 +897,7 @@ def test_motion_sensor_clear_passive():
870897 },
871898 device = ble_device ,
872899 rssi = - 87 ,
900+ active = False ,
873901 )
874902
875903
@@ -906,6 +934,7 @@ def test_motion_sensor_motion():
906934 },
907935 device = ble_device ,
908936 rssi = - 87 ,
937+ active = True ,
909938 )
910939
911940
@@ -942,6 +971,7 @@ def test_motion_sensor_motion_passive():
942971 },
943972 device = ble_device ,
944973 rssi = - 87 ,
974+ active = False ,
945975 )
946976
947977
@@ -978,6 +1008,7 @@ def test_motion_sensor_is_light_passive():
9781008 },
9791009 device = ble_device ,
9801010 rssi = - 93 ,
1011+ active = True ,
9811012 )
9821013
9831014
@@ -1014,6 +1045,7 @@ def test_motion_sensor_is_light_active():
10141045 },
10151046 device = ble_device ,
10161047 rssi = - 93 ,
1048+ active = True ,
10171049 )
10181050
10191051
@@ -1049,6 +1081,7 @@ def test_motion_with_light_detected():
10491081 },
10501082 device = ble_device ,
10511083 rssi = - 84 ,
1084+ active = True ,
10521085 )
10531086
10541087
@@ -1083,4 +1116,5 @@ def test_motion_sensor_motion_passive():
10831116 },
10841117 device = ble_device ,
10851118 rssi = - 87 ,
1119+ active = False ,
10861120 )
0 commit comments