Ver Fonte

Wilfa Haze: modify mode to match contributor's branch

Some changes did not merge automatically and got lost due to incorrect
conflict resolution.

PR #158
Jason Rumney há 3 anos atrás
pai
commit
c570b0821e

+ 3 - 3
custom_components/tuya_local/devices/wilfa_haze_hu400bc_humidifier.yaml

@@ -23,15 +23,15 @@ primary_entity:
         - step: 5
           constraint: mode
           conditions:
-            - dps_val: AUTO
+            - dps_val: auto
               invalid: true
     - id: 24
       type: string
       name: mode
       mapping:
-        - dps_val: AUTO
+        - dps_val: auto
           value: auto
-        - dps_val: MANUAL
+        - dps_val: humidity
           value: normal
     - id: 20
       type: integer

+ 1 - 1
tests/const.py

@@ -1177,7 +1177,7 @@ WILFA_HAZE_HUMIDIFIER_PAYLOAD = {
     "20": 0,
     "22": 0,
     "23": "level_3",
-    "24": "MANUAL",
+    "24": "humidity",
     "26": False,
     "35": False,
 }

+ 4 - 4
tests/devices/test_wilfa_haze_hu400bc_humidifier.py

@@ -176,20 +176,20 @@ class TestWilfaHazeHumidifier(
         )
 
     def test_mode(self):
-        self.dps[PRESET_DPS] = "AUTO"
+        self.dps[PRESET_DPS] = "auto"
         self.assertEqual(self.subject.mode, MODE_AUTO)
-        self.dps[PRESET_DPS] = "MANUAL"
+        self.dps[PRESET_DPS] = "humidity"
         self.assertEqual(self.subject.mode, MODE_NORMAL)
 
     async def test_set_mode_to_auto(self):
         async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "AUTO"}
+            self.subject._device, {PRESET_DPS: "auto"}
         ):
             await self.subject.async_set_mode(MODE_AUTO)
 
     async def test_set_mode_to_normal(self):
         async with assert_device_properties_set(
-            self.subject._device, {PRESET_DPS: "MANUAL"}
+            self.subject._device, {PRESET_DPS: "humidity"}
         ):
             await self.subject.async_set_mode(MODE_NORMAL)