Browse Source

HA 2023.9.0 has altered the config flow return values.

Config flow tests need updating to include the new "preview" entry
that is being returned.

Update version required to ensure older versions that do not have this
are not used for the tests.  Since we don't make use of it, this does
not affect the version of HA needed by end users at runtime, only the
automated tests.

- minor update to Ditua config: HSV ranges should start from 0 not 1.
Jason Rumney 2 years ago
parent
commit
94eb89a5ca

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

@@ -48,17 +48,17 @@ secondary_entities:
           - name: h
             bytes: 2
             range:
-              min: 1
+              min: 0
               max: 360
           - name: s
             bytes: 1
             range:
-              min: 1
+              min: 0
               max: 255
           - name: v
             bytes: 1
             range:
-              min: 1
+              min: 0
               max: 255
       - id: 109
         type: string

+ 1 - 1
requirements-dev.txt

@@ -2,7 +2,7 @@ black
 fuzzywuzzy
 isort
 levenshtein
-pytest-homeassistant-custom-component~=0.13.49
+pytest-homeassistant-custom-component~=0.13.54
 pytest
 pytest-asyncio
 pytest-cov

+ 3 - 0
tests/test_config_flow.py

@@ -228,6 +228,7 @@ async def test_flow_user_init(hass):
         "step_id": "user",
         "type": "form",
         "last_step": ANY,
+        "preview": ANY,
     }
     assert expected == result
     # Check the schema.  Simple comparison does not work since they are not
@@ -379,6 +380,7 @@ async def test_flow_select_type_init(mock_device, hass):
         "step_id": "select_type",
         "type": "form",
         "last_step": ANY,
+        "preview": ANY,
     }
     assert expected == result
     # Check the schema.  Simple comparison does not work since they are not
@@ -443,6 +445,7 @@ async def test_flow_choose_entities_init(hass):
         "step_id": "choose_entities",
         "type": "form",
         "last_step": ANY,
+        "preview": ANY,
     }
     assert expected == result
     # Check the schema.  Simple comparison does not work since they are not