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

Inkbird sousvide tests: ensure device is on to test HVACAction

- Breville dehumidifier: deprecate separate humidity sensor
   - this slipped through review
Jason Rumney 1 год назад
Родитель
Сommit
289b37dd34

+ 1 - 0
custom_components/tuya_local/devices/breville_lad208_dehumidifier.yaml

@@ -117,6 +117,7 @@ secondary_entities:
           - dps_val: "24"
             value: "24h"
   - entity: sensor
+    deprecated: humidifier.current_humidity
     class: humidity
     dps:
       - id: 104

+ 4 - 0
tests/devices/test_inkbird_sousvide.py

@@ -141,6 +141,7 @@ class TestInkbirdSousVideCooker(
         self.assertCountEqual(self.subject.hvac_modes, [HVACMode.OFF, HVACMode.HEAT])
 
     def test_hvac_action(self):
+        self.dps[HVACMODE_DPS] = True
         self.dps[HVACACTION_DPS] = "stop"
         self.assertEqual(self.subject.hvac_action, HVACAction.OFF)
 
@@ -150,6 +151,9 @@ class TestInkbirdSousVideCooker(
         self.dps[HVACACTION_DPS] = "complete"
         self.assertEqual(self.subject.hvac_action, HVACAction.IDLE)
 
+        self.dps[HVACMODE_DPS] = False
+        self.assertEqual(self.subject.hvac_action, HVACAction.OFF)
+
     async def test_turn_on(self):
         async with assert_device_properties_set(
             self.subject._device, {HVACMODE_DPS: True}