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

feat(mcs350): add Teploluxe MCS350 thermostat (#5420)

* feat(mcs350): add Teploluxe MCS350 thermostat

Add new thermostat
products:
  - id: "tfmfbr341u0tx3fb"
    manufacturer: Teplolux
    model: Teploluxe MCS350 Thermostat

* fix(mcs350): remove invalid values at teploluxe_mcs350.yaml

* fix(mcs350): remove trailing spaces

* fix(mcs350): correct naming

* fix(mcs350): correct entities naming

* fix(mcs350): add power scaling

* fix(mcs350): correct validaton

* Update thermostat YAML with new temperature mappings

- Standardize naming to be consistent with other thermostats.
- use sensor setting to dynamically select whether floor or air temperature is shown in the main climate entity.

* Abbreviate ar_temp to avoid false positive on similarity check

- air_temperature is too similar to standard attributes, so falsely detected as a possible typo.
Change the name to avoid that. Since it is a hidden attribute, an abbreviated name is fine.

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
eldarsudden 8 часов назад
Родитель
Сommit
2d8679e624
1 измененных файлов с 152 добавлено и 0 удалено
  1. 152 0
      custom_components/tuya_local/devices/teploluxe_mcs350_thermostat.yaml

+ 152 - 0
custom_components/tuya_local/devices/teploluxe_mcs350_thermostat.yaml

@@ -0,0 +1,152 @@
+name: Thermostat
+products:
+  - id: "tfmfbr341u0tx3fb"
+    manufacturer: Teploluxe
+    model: MCS350
+entities:
+  - entity: climate
+    translation_key: thermostat
+    dps:
+      - id: 111
+        name: hvac_mode
+        type: string
+        mapping:
+          - dps_val: "OFF"
+            value: "off"
+          - dps_val: "ON"
+            constraint: preset_mode
+            conditions:
+              - dps_val: manual
+                # manual
+                value: heat
+              - dps_val: program
+                # program
+                value: auto
+      - id: 2
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: manual
+            value: manual
+          - dps_val: program
+            value: program
+
+      - id: 16
+        type: integer
+        name: temperature
+        unit: C
+        range:
+          min: 5
+          max: 45
+
+      - id: 24
+        type: integer
+        name: current_temperature
+        mapping:
+          - constraint: temp_sensor
+            conditions:
+              - dps_val: air
+                value_redirect: air_temp
+
+      - id: 43
+        type: string
+        name: temp_sensor
+        hidden: true
+
+      - id: 102
+        type: integer
+        name: air_temp
+        hidden: true
+
+      - id: 106
+        type: boolean
+        name: hvac_action
+        mapping:
+          - dps_val: true
+            value: heating
+          - dps_val: false
+            value: idle
+
+  - entity: number
+    translation_key: temperature_calibration
+    class: temperature_delta
+    category: config
+    dps:
+      - id: 27
+        type: integer
+        name: value
+        unit: C
+        range:
+          min: -9
+          max: 9
+
+  - entity: number
+    name: Maximum air temperature
+    class: temperature
+    category: config
+    dps:
+      - id: 103
+        type: integer
+        name: value
+        range:
+          min: 5
+          max: 45
+
+  - entity: sensor
+    class: power
+    dps:
+      - id: 22
+        type: integer
+        name: sensor
+        unit: kW
+        mapping:
+          - scale: 10
+
+  - entity: sensor
+    class: temperature
+    dps:
+      - id: 102
+        type: integer
+        name: sensor
+        unit: °C
+
+  - entity: switch
+    name: Open window detection
+    category: config
+    dps:
+      - id: 110
+        type: string
+        name: switch
+        mapping:
+          - dps_val: "OFF"
+            value: false
+          - dps_val: "ON"
+            value: true
+
+  - entity: select
+    name: Temperature sensor
+    category: config
+    dps:
+      - id: 43
+        type: string
+        name: option
+        mapping:
+          - dps_val: flor
+            value: Floor
+          - dps_val: air
+            value: Room
+          - dps_val: booth
+            value: Both
+
+  - entity: switch
+    name: Learning mode
+    category: config
+    dps:
+      - id: 107
+        type: string
+        name: switch
+        mapping:
+          - dps_val: "OFF"
+            value: false
+          - dps_val: "ON"
+            value: true