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

Tests: switch is not required for humidifiers.

Humidifiers can work without a switch (always on).
Also current_humidity is an optional attribute now.
Jason Rumney 2 лет назад
Родитель
Сommit
083bd5254e
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      tests/test_device_config.py

+ 1 - 1
tests/test_device_config.py

@@ -67,7 +67,7 @@ KNOWN_DPS = {
         "required": [{"or": ["preset_mode", "speed"]}],
         "optional": ["switch", "oscillate", "direction"],
     },
-    "humidifier": {"required": ["switch", "humidity"], "optional": ["mode"]},
+    "humidifier": {"required": ["humidity"], "optional": ["switch", "mode", "current_humidity"]},
     "lawn_mower": {"required": ["activity", "command"], "optional": []},
     "light": {
         "required": [{"or": ["switch", "brightness", "effect"]}],