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

Dynasty BTX: add range to temperature, disable units

- add range to temperature so min and max temperature are correctly set, not just defaulting to values that happen to be correct now, but may not be in future.
- rename temperature_unit and fix unit to C, as handling F properly when the temperature is a mapped list like this is too complex.
Jason Rumney 2 лет назад
Родитель
Сommit
3198e405e4
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      custom_components/tuya_local/devices/dynasty_btx_fireplace.yaml

+ 5 - 1
custom_components/tuya_local/devices/dynasty_btx_fireplace.yaml

@@ -20,6 +20,10 @@ primary_entity:
     - id: 5
       name: temperature
       type: string
+      unit: C
+      range:
+        min: 16
+        max: 30
       mapping:
         - dps_val: "0"
           value: 16
@@ -36,7 +40,7 @@ primary_entity:
         - dps_val: "6"
           value: 30
     - id: 13
-      name: temperature_unit
+      name: temperature_unit_setting
       type: string
       mapping:
         - dps_val: "c"