ソースを参照

Add Macro MA-20WODP gas water heater (#4822)

* Add Macro MA-20WODP gas water heater config

Adds device configuration for the Macro MA-20WODP smart gas water heater
with Tuya pid yliuzmey7vxflbzr. Supports temperature control, instant
heating switch, fault detection, and work state reporting.

* Add product page link to Macro MA-20WODP config

* Fix Macro MA-20WODP config per review feedback

- Rename to "Gas water heater" (HA naming convention)
- Switch translation_key from water_air to translation_only_key: hot_water (pure gas, no air heating)
- Change Manual mode value from electric to gas (device is gas-fired throughout)
- Correct temperature range to 36-60°C per product specs (was 40-75°C)
- Rename "Instant Heating" to "Instant heating" (HA naming convention)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Rename water heater YAML file for consistency

- remote model_id as it is the same as model

PR #4822

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Chen Jie 2 ヶ月 前
コミット
0775cf444d

+ 77 - 0
custom_components/tuya_local/devices/macro_ma20wodp_waterheater.yaml

@@ -0,0 +1,77 @@
+# https://www.cityenergylife.com.sg/products/ma-20wodp
+name: Gas water heater
+products:
+  - id: yliuzmey7vxflbzr
+    manufacturer: Macro
+    model: MA-20WODP
+entities:
+  - entity: water_heater
+    translation_only_key: hot_water
+    dps:
+      - id: 1
+        type: boolean
+        name: operation_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            constraint: work_mode
+            conditions:
+              - dps_val: Manual
+                value: gas
+              - dps_val: Eco
+                value: eco
+              - dps_val: Turbo
+                value: performance
+      - id: 2
+        type: string
+        name: work_mode
+        hidden: true
+      - id: 9
+        type: integer
+        name: temperature
+        unit: C
+        range:
+          min: 36
+          max: 60
+        mapping:
+          - step: 5
+      - id: 10
+        type: integer
+        name: current_temperature
+  - entity: switch
+    name: Instant heating
+    icon: mdi:lightning-bolt
+    dps:
+      - id: 15
+        type: boolean
+        name: switch
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 20
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 20
+        type: bitfield
+        name: fault_code
+  - entity: sensor
+    translation_key: status
+    class: enum
+    category: diagnostic
+    dps:
+      - id: 13
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: Stop
+            value: idle
+          - dps_val: Heating
+            value: heating
+          - dps_val: Warm
+            value: keeping_warm