Преглед на файлове

Correct Meter and Meter Pro modelFriendlyName (#348)

Retha Runolfsson преди 6 дни
родител
ревизия
857bb0c175
променени са 2 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 2 2
      switchbot/adv_parser.py
  2. 4 4
      tests/test_adv_parser.py

+ 2 - 2
switchbot/adv_parser.py

@@ -115,13 +115,13 @@ SUPPORTED_TYPES: dict[str | bytes, SwitchbotSupportedType] = {
     },
     "4": {
         "modelName": SwitchbotModel.METER_PRO,
-        "modelFriendlyName": "Meter",
+        "modelFriendlyName": "Meter Pro",
         "func": process_wosensorth,
         "manufacturer_id": 2409,
     },
     "5": {
         "modelName": SwitchbotModel.METER_PRO_C,
-        "modelFriendlyName": "Meter",
+        "modelFriendlyName": "Meter Pro CO2",
         "func": process_wosensorth_c,
         "manufacturer_id": 2409,
     },

+ 4 - 4
tests/test_adv_parser.py

@@ -1309,7 +1309,7 @@ def test_meter_pro_active() -> None:
             },
             "isEncrypted": False,
             "model": "4",
-            "modelFriendlyName": "Meter",
+            "modelFriendlyName": "Meter Pro",
             "modelName": SwitchbotModel.METER_PRO,
             "rawAdvData": b"4\x00d",
         },
@@ -1338,7 +1338,7 @@ def test_meter_pro_passive() -> None:
             },
             "isEncrypted": False,
             "model": "4",
-            "modelFriendlyName": "Meter",
+            "modelFriendlyName": "Meter Pro",
             "modelName": SwitchbotModel.METER_PRO,
             "rawAdvData": None,
         },
@@ -1371,7 +1371,7 @@ def test_meter_pro_c_active() -> None:
             },
             "isEncrypted": False,
             "model": "5",
-            "modelFriendlyName": "Meter",
+            "modelFriendlyName": "Meter Pro CO2",
             "modelName": SwitchbotModel.METER_PRO_C,
             "rawAdvData": b"5\x00d",
         },
@@ -1403,7 +1403,7 @@ def test_meter_pro_c_passive() -> None:
             },
             "isEncrypted": False,
             "model": "5",
-            "modelFriendlyName": "Meter",
+            "modelFriendlyName": "Meter Pro CO2",
             "modelName": SwitchbotModel.METER_PRO_C,
             "rawAdvData": None,
         },