Преглед изворни кода

Adjust timer on Kogan heaters to be minutes, not hours.

Issue #102, #issuecomment-1006180041
Jason Rumney пре 4 година
родитељ
комит
7bf1f09977

+ 2 - 2
custom_components/tuya_local/devices/kogan_kahtp_heater.yaml

@@ -55,7 +55,7 @@ secondary_entities:
       - id: 8
         name: value
         type: integer
-        unit: h
+        unit: min
         range:
           min: 0
-          max: 24
+          max: 1440

+ 2 - 2
custom_components/tuya_local/devices/kogan_kawfhtp_heater.yaml

@@ -54,7 +54,7 @@ secondary_entities:
       - id: 5
         type: integer
         name: value
-        unit: h
+        unit: min
         range:
           min: 0
-          max: 24
+          max: 1440

+ 3 - 3
tests/devices/test_kogan_kahtp_heater.py

@@ -4,7 +4,7 @@ from homeassistant.components.climate.const import (
     SUPPORT_PRESET_MODE,
     SUPPORT_TARGET_TEMPERATURE,
 )
-from homeassistant.const import STATE_UNAVAILABLE, TIME_HOURS
+from homeassistant.const import STATE_UNAVAILABLE, TIME_MINUTES
 
 from ..const import KOGAN_HEATER_PAYLOAD
 from ..helpers import assert_device_properties_set
@@ -39,8 +39,8 @@ class TestGoldairKoganKAHTPHeater(
         self.setUpBasicNumber(
             TIMER_DPS,
             self.entities.get("number_timer"),
-            max=24,
-            unit=TIME_HOURS,
+            max=1440,
+            unit=TIME_MINUTES,
         )
         self.mark_secondary(["lock_child_lock", "number_timer"])
 

+ 3 - 3
tests/devices/test_kogan_kawfhtp_heater.py

@@ -4,7 +4,7 @@ from homeassistant.components.climate.const import (
     SUPPORT_PRESET_MODE,
     SUPPORT_TARGET_TEMPERATURE,
 )
-from homeassistant.const import STATE_UNAVAILABLE, TIME_HOURS
+from homeassistant.const import STATE_UNAVAILABLE, TIME_MINUTES
 
 from ..const import KOGAN_KAWFHTP_HEATER_PAYLOAD
 from ..helpers import assert_device_properties_set
@@ -42,8 +42,8 @@ class TestGoldairKoganKAHTPHeater(
         self.setUpBasicNumber(
             TIMER_DPS,
             self.entities.get("number_timer"),
-            max=24,
-            unit=TIME_HOURS,
+            max=1440,
+            unit=TIME_MINUTES,
         )
         self.mark_secondary(["lock_child_lock", "number_timer"])