Browse Source

Add F32 Thermostat configuration (#4443)

* Add F32 Thermostat configuration

* Fix: Remove conflicting select entity in F32 thermostat to prevent crash

Co-Authored-By: Warp <agent@warp.dev>

* Fix: Update F32 thermostat config with missing modes and correct types

- Added Holiday, Frost, Slow Start modes\n- Added config entities for sensors, calibration, etc.\n- Fixed 'NoneType' crash by changing enum to string\n- Updated preset names with proper capitalization\n\nCo-Authored-By: Warp <agent@warp.dev>

* Fix: Disable temperature unit constraint to prevent startup deadlock

The constraint logic on the temperature DPS caused a deadlock during startup. Disabling it restores stability. Temperature defaults to Celsius scale.

Co-Authored-By: Warp <agent@warp.dev>

* Fix: Clean up F32 config and fix type errors

- Removed commented out constraints to prevent syntax errors\n- Restored valid mapping for temperature_unit\n- Ensure all enums are using type: string (implicitly handled in this clean version)\n\nCo-Authored-By: Warp <agent@warp.dev>

* Fix: Correct YAML syntax and add translation keys

This commit fixes the YAML syntax error caused by previous editing attempts and adds missing translation keys to pass CI checks.

Co-Authored-By: Warp <agent@warp.dev>

* Fix: Resolve duplicate DPS ID error by moving presets to Select entity

- Removed preset_mode from climate entity to avoid duplicate ID 2\n- Added 'Thermostat Mode' select entity to allow full control of all 5 modes (Auto, Manual, Holiday, Frost, Slow Start)\n- This resolves the CI 'Duplicate key' error\n\nCo-Authored-By: Warp <agent@warp.dev>

* Refactor F32 Thermostat configuration

- use translations where available
- merge mode into climate as preset_mode

PR #4443

---------

Co-authored-by: Warp <agent@warp.dev>
Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
David Vismans 17 giờ trước cách đây
mục cha
commit
0c4602fb83
1 tập tin đã thay đổi với 197 bổ sung0 xóa
  1. 197 0
      custom_components/tuya_local/devices/et_f32_thermostat.yaml

+ 197 - 0
custom_components/tuya_local/devices/et_f32_thermostat.yaml

@@ -0,0 +1,197 @@
+name: Thermostat
+products:
+  - id: enasdcyucyl7tgrz
+    manufacturer: ET
+    model: ET_4A F32
+
+entities:
+  - entity: climate
+    translation_key: thermostat
+    dps:
+      - id: 2
+        type: string
+        name: hvac_mode
+        mapping:
+          - dps_val: AUTO
+            value: auto
+          - dps_val: MANUAL
+            value: heat
+          - dps_val: HOLIDAY
+            value: auto
+            hidden: true
+          - dps_val: FROST
+            value: heat
+            hidden: true
+          - dps_val: SLOW
+            value: heat
+            hidden: true
+      - id: 16
+        type: integer
+        name: temperature
+        range:
+          min: 5
+          max: 40
+        mapping:
+          - scale: 10
+      - id: 17
+        type: integer
+        name: temperature_f
+        hidden: true
+        range:
+          min: 41
+          max: 104
+        mapping:
+          - scale: 10
+            step: 10
+      - id: 24
+        type: integer
+        name: current_temperature
+        mapping:
+          - scale: 10
+      - id: 29
+        type: integer
+        name: current_temperature_f
+        hidden: true
+        mapping:
+          - scale: 10
+      - id: 23
+        type: string
+        name: temperature_unit
+        mapping:
+          - dps_val: c
+            value: C
+          - dps_val: f
+            value: F
+      - id: 2
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: AUTO
+            value: program
+          - dps_val: MANUAL
+            value: manual
+          - dps_val: HOLIDAY
+            value: away
+          - dps_val: FROST
+            value: Anti-frost
+          - dps_val: SLOW
+            value: eco
+
+  - entity: select
+    name: Sensor
+    category: config
+    icon: mdi:home-thermometer
+    dps:
+      - id: 103
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: Internal
+          - dps_val: "1"
+            value: External
+          - dps_val: "2"
+            value: Both
+
+  - entity: number
+    category: config
+    translation_key: temperature_calibration
+    dps:
+      - id: 104
+        type: integer
+        name: value
+        range:
+          min: -9
+          max: 9
+        mapping:
+          - scale: 10
+
+  - entity: select
+    name: Temperature hysteresis
+    category: config
+    icon: mdi:thermometer-lines
+    dps:
+      - id: 105
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0_5"
+            value: "0.5°C"
+          - dps_val: "1"
+            value: "1.0°C"
+          - dps_val: "2"
+            value: "2.0°C"
+          - dps_val: "3"
+            value: "3.0°C"
+
+  - entity: number
+    name: Holiday days
+    category: config
+    icon: mdi:calendar-clock
+    dps:
+      - id: 101
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 99
+
+  - entity: switch
+    name: Adaptive
+    category: config
+    icon: mdi:auto-fix
+    dps:
+      - id: 110
+        type: boolean
+        name: switch
+
+  - entity: switch
+    name: Open window detection
+    category: config
+    icon: mdi:window-open
+    dps:
+      - id: 111
+        type: boolean
+        name: switch
+
+  - entity: light
+    translation_key: display
+    category: config
+    dps:
+      - id: 115
+        type: integer
+        name: brightness
+        range:
+          min: 1
+          max: 8
+
+  - entity: lock
+    category: config
+    translation_key: child_lock
+    dps:
+      - id: 40
+        type: boolean
+        name: lock
+
+  - entity: button
+    translation_key: factory_reset
+    category: config
+    dps:
+      - id: 39
+        type: boolean
+        name: button
+
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 45
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 45
+        type: bitfield
+        name: fault_code