Просмотр исходного кода

Rename some configs that ended up being ambiguously named.

- Kogan Switch/Kogan Switch 2 seem to be common configs for smartplugs sold
  under other brands, so make them a more generic name.
- Inkbird Thermostat - based on info elsewhere, 308A is completely different than 306A, so make this specific to 306A to avoid confusion.
- Electriq Dehumidifier was for CD25PRO, which was already found incompatible with CD20PRO
Jason Rumney 4 лет назад
Родитель
Сommit
c32d600fe7

+ 1 - 0
custom_components/tuya_local/devices/electriq_dehumidifier.yaml → custom_components/tuya_local/devices/electriq_cd25pro_dehumidifier.yaml

@@ -1,4 +1,5 @@
 name: "Electriq Dehumidifier CD25PRO-LE-V2"
+legacy_type: electriq_dehumidifier
 primary_entity:
   entity: humidifier
   class: dehumidifier

+ 1 - 0
custom_components/tuya_local/devices/inkbird_thermostat.yaml → custom_components/tuya_local/devices/inkbird_itc306a_thermostat.yaml

@@ -1,4 +1,5 @@
 name: Inkbird ITC-306A Thermostat
+legacy_type: inkbird_thermostat
 primary_entity:
   entity: climate
   dps:

+ 2 - 1
custom_components/tuya_local/devices/kogan_switch.yaml → custom_components/tuya_local/devices/smartplugv1.yaml

@@ -1,4 +1,5 @@
-name: Kogan Smart Switch
+name: Energy Monitoring Smart Plug
+legacy_type: kogan_switch
 primary_entity:
   entity: switch
   class: outlet

+ 1 - 1
custom_components/tuya_local/devices/kogan_switch2.yaml → custom_components/tuya_local/devices/smartplugv2.yaml

@@ -1,4 +1,4 @@
-name: Kogan Smart Switch v2
+name: Energy Monitoring Smart Plug
 legacy_type: kogan_switch
 primary_entity:
   entity: switch

+ 4 - 2
tests/devices/test_electriq_dehumidifier.py → tests/devices/test_electriq_cd25_dehumidifier.py

@@ -17,11 +17,13 @@ CURRENTTEMP_DPS = "103"
 IONIZER_DPS = "104"
 
 
-class TestElectriqDehumidifier(TuyaDeviceTestCase):
+class TestElectriqCD25ProDehumidifier(TuyaDeviceTestCase):
     __test__ = True
 
     def setUp(self):
-        self.setUpForConfig("electriq_dehumidifier.yaml", ELECTRIQ_DEHUMIDIFIER_PAYLOAD)
+        self.setUpForConfig(
+            "electriq_cd25pro_dehumidifier.yaml", ELECTRIQ_DEHUMIDIFIER_PAYLOAD
+        )
         self.subject = self.entities.get("humidifier")
         self.fan = self.entities.get("fan")
         self.light = self.entities.get("light")

+ 3 - 1
tests/devices/test_inkbird_thermostat.py → tests/devices/test_inkbird_itc306a_thermostat.py

@@ -34,7 +34,9 @@ class TestInkbirdThermostat(TuyaDeviceTestCase):
     __test__ = True
 
     def setUp(self):
-        self.setUpForConfig("inkbird_thermostat.yaml", INKBIRD_THERMOSTAT_PAYLOAD)
+        self.setUpForConfig(
+            "inkbird_itc306a_thermostat.yaml", INKBIRD_THERMOSTAT_PAYLOAD
+        )
         self.subject = self.entities.get("climate")
 
     def test_supported_features(self):

+ 1 - 1
tests/devices/test_kogan_switch.py → tests/devices/test_smartplugv1.py

@@ -17,7 +17,7 @@ class TestKoganSwitch(TuyaDeviceTestCase):
     __test__ = True
 
     def setUp(self):
-        self.setUpForConfig("kogan_switch.yaml", KOGAN_SOCKET_PAYLOAD)
+        self.setUpForConfig("smartplugv1.yaml", KOGAN_SOCKET_PAYLOAD)
         self.subject = self.entities.get("switch")
 
     def test_device_class_is_outlet(self):

+ 2 - 2
tests/devices/test_kogan_switch2.py → tests/devices/test_smartplugv2.py

@@ -13,11 +13,11 @@ POWER_DPS = "19"
 VOLTAGE_DPS = "20"
 
 
-class TestKoganSwitch(TuyaDeviceTestCase):
+class TestSwitchV2(TuyaDeviceTestCase):
     __test__ = True
 
     def setUp(self):
-        self.setUpForConfig("kogan_switch2.yaml", KOGAN_SOCKET_PAYLOAD2)
+        self.setUpForConfig("smartplugv2.yaml", KOGAN_SOCKET_PAYLOAD2)
         self.subject = self.entities.get("switch")
 
     def test_device_class_is_outlet(self):