ソースを参照

feat(arlec_panel_heater_v2): add 2400W support

The 2400W model has a different set of presets, but since there is no
overlap, it can be handled conditionally as one or the other.

Issue #3392
Jason Rumney 8 ヶ月 前
コミット
287bda18d8

+ 26 - 8
custom_components/tuya_local/devices/arlec_panel_heater_v2.yaml

@@ -31,14 +31,32 @@ entities:
         type: string
         optional: true
         mapping:
-          - dps_val: ECO
-            value: eco
-          - dps_val: Comfort
-            value: comfort
-          - dps_val: Antifrost
-            value: away
-          - dps_val: null
-            value: unknown
+          - constraint: preset_mode
+            conditions:
+              - dps_val: [ECO, Comfort, Antifrost]
+                mapping:
+                  - dps_val: ECO
+                    value: eco
+                  - dps_val: Comfort
+                    value: comfort
+                  - dps_val: Antifrost
+                    value: away
+              - dps_val: [low, high, af]
+                mapping:
+                  - dps_val: low
+                    value: eco
+                  - dps_val: high
+                    value: comfort
+                  - dps_val: af
+                    value: away
+              - dps_val: null
+                mapping:
+                  - dps_val: ECO
+                    value: eco
+                  - dps_val: Comfort
+                    value: comfort
+                  - dps_val: Antifrost
+                    value: away
   - entity: lock
     translation_key: child_lock
     category: config