Răsfoiți Sursa

Somgom single switch: add compatible Andeli water heater switch

- add alternate power_off/power_on/last mappings for initial state.
- make these the default, as #253 also listed these though the dp was missing
  in the logs.

PR #2977
Jason Rumney 1 an în urmă
părinte
comite
55c75e40b0
1 a modificat fișierele cu 17 adăugiri și 4 ștergeri
  1. 17 4
      custom_components/tuya_local/devices/somgom_single_switch.yaml

+ 17 - 4
custom_components/tuya_local/devices/somgom_single_switch.yaml

@@ -1,10 +1,15 @@
-name: Wall switch
+name: Switch
 products:
 products:
   - id: nqodepctqralr6su
   - id: nqodepctqralr6su
     manufacturer: Novadigital
     manufacturer: Novadigital
   - id: vxo9yezswiumvync
   - id: vxo9yezswiumvync
     manufacturer: PST
     manufacturer: PST
     model: WT-E1
     model: WT-E1
+    name: Wall switch
+  - id: dcqi7rv16ft3oneb
+    manufacturer: Andeli
+    model: Smart Boiler
+    name: Water heater
 entities:
 entities:
   - entity: switch
   - entity: switch
     dps:
     dps:
@@ -51,14 +56,22 @@ entities:
                     value: "on"
                     value: "on"
                   - dps_val: memory
                   - dps_val: memory
                     value: memory
                     value: memory
+              - dps_val: ["power_off", "power_on", "last"]
+                mapping:
+                  - dps_val: power_off
+                    value: "off"
+                  - dps_val: power_on
+                    value: "on"
+                  - dps_val: last
+                    value: memory
               # during startup there may be no value, but we need the options
               # during startup there may be no value, but we need the options
               - dps_val: null
               - dps_val: null
                 mapping:
                 mapping:
-                  - dps_val: "off"
+                  - dps_val: power_off
                     value: "off"
                     value: "off"
-                  - dps_val: "on"
+                  - dps_val: power_on
                     value: "on"
                     value: "on"
-                  - dps_val: memory
+                  - dps_val: last
                     value: memory
                     value: memory
   - entity: light
   - entity: light
     translation_key: backlight
     translation_key: backlight