Explorar o código

fix(tests): allow float target_range

It is valid for int values from Tuya to be moved into a floating point range.
The source code already handles this case, but because it had not yet been used the
tests were only checking for int.

PR #4703
Jason Rumney hai 6 horas
pai
achega
9d01622ba6
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      tests/test_device_config.py

+ 2 - 2
tests/test_device_config.py

@@ -41,8 +41,8 @@ CONDMAP_SCHEMA = vol.Schema(
             vol.Required("max"): int,
         },
         vol.Optional("target_range"): {
-            vol.Required("min"): int,
-            vol.Required("max"): int,
+            vol.Required("min"): vol.Any(int, float),
+            vol.Required("max"): vol.Any(int, float),
         },
         vol.Optional("scale"): vol.Any(int, float),
         vol.Optional("step"): vol.Any(int, float),