瀏覽代碼

tests: update for temperature_delta changes

I suspect this will also need the test framework to be updated to the
version that needs further changes to async tests, so expect tests to
be broken for a bit.
Jason Rumney 1 周之前
父節點
當前提交
0d14d4c5c2

+ 2 - 0
custom_components/tuya_local/devices/inkbird_itc308_thermostat.yaml

@@ -216,6 +216,7 @@ entities:
   - entity: number
     category: config
     name: Heating hysteresis
+    class: temperature_delta
     icon: "mdi:thermometer-chevron-up"
     dps:
       - id: 117
@@ -239,6 +240,7 @@ entities:
   - entity: number
     category: config
     name: Cooling hysteresis
+    class: temperature_delta
     icon: "mdi:thermometer-chevron-down"
     dps:
       - id: 118

+ 4 - 1
tests/devices/test_inkbird_itc308_thermostat.py

@@ -90,7 +90,8 @@ class TestInkbirdITC308Thermostat(
                     "step": 0.1,
                     "min": -9.9,
                     "max": 9.9,
-                    "unit": "°",
+                    "device_class": NumberDeviceClass.TEMPERATURE_DELTA,
+                    "unit": NumberDeviceClass.CELSIUS,
                 },
                 {
                     "name": "number_compressor_delay",
@@ -125,6 +126,7 @@ class TestInkbirdITC308Thermostat(
                     "step": 0.1,
                     "min": 0.3,
                     "max": 15.0,
+                    "device_class": NumberDeviceClass.TEMPERATURE_DELTA,
                     "unit": UnitOfTemperature.CELSIUS,
                 },
                 {
@@ -134,6 +136,7 @@ class TestInkbirdITC308Thermostat(
                     "step": 0.1,
                     "min": 0.3,
                     "max": 15.0,
+                    "device_class": NumberDeviceClass.TEMPERATURE_DELTA,
                     "unit": UnitOfTemperature.CELSIUS,
                 },
             ]

+ 2 - 1
tests/devices/test_inkbird_sousvide.py

@@ -70,7 +70,8 @@ class TestInkbirdSousVideCooker(
                     "max": 9.9,
                     "scale": 10,
                     "step": 0.1,
-                    "unit": "°",
+                    "device_class": NumberDeviceClass.TEMPERATURE_DELTA,
+                    "unit": UnitOfTemperature.CELSIUS,
                 },
             ]
         )

+ 4 - 2
tests/devices/test_nashone_mts700wb_thermostat.py

@@ -1,6 +1,7 @@
 from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
+from homeassistant.components.number import NumberDeviceClass
 from homeassistant.components.sensor import SensorDeviceClass
-from homeassistant.const import UnitOfTime
+from homeassistant.const import UnitOfTime, UnitOfTemperature
 
 from ..const import NASHONE_MTS700WB_THERMOSTAT_PAYLOAD
 from ..helpers import assert_device_properties_set
@@ -56,7 +57,8 @@ class TestNashoneMTS700WBThermostat(
             self.entities.get("number_temperature_calibration"),
             min=-5,
             max=5,
-            unit="°",
+            device_class=NumberDeviceClass.TEMPERATURE_DELTA,
+            unit=UnitOfTemperature.CELSIUS,
         )
         self.setUpBasicSelect(
             TIMER_DPS,