فهرست منبع

Add dual switch with timer

Should be a fairly common config, so implemented as generic.
Issue #253
Jason Rumney 3 سال پیش
والد
کامیت
7ed5213098
3فایلهای تغییر یافته به همراه51 افزوده شده و 0 حذف شده
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 2 0
      DEVICES.md
  3. 48 0
      custom_components/tuya_local/devices/simple_dual_switch_timer.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -126,3 +126,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [cooperaj](https://github.com/cooperaj) for contributing support for ElectriQ CD12PRO-LE dehumidifiers.
 - [geroulas](https://github.com/geroulas) for assisting with support for Inventor Atmosphere XL dehumidifiers.
 - [and7ey](https://github.com/and7ey) for assisting with support for Screen sync smart lights.
+- [dragosmd](https://github.com/dragosmd) and [RomchikL](https://github.com/RomchikL) for assisting with support for more dual switches.

+ 2 - 0
DEVICES.md

@@ -147,6 +147,8 @@
   _confirmed working with CBE smartplugs_
 - Generic smartplug with some additional encoded schedule info.
   _confirmed working as a simple switch and timer with Kashimura KJ-173_
+- Generic double switch with timers (confirmed with Living dual switch)
+- Generic triple and quad switches (confirmed with Songam wall switches)
 - Mirabella Genio smartplug with USB
 - Grid Connect double outlet with Energy Monitoring, Master and Individual switches and Child Lock.
 - DIGOO DG-SP202 dual smartplug with energy monitoring and timers.

+ 48 - 0
custom_components/tuya_local/devices/simple_dual_switch_timer.yaml

@@ -0,0 +1,48 @@
+name: Dual switch with timers
+product:
+  - id: key9nfnyp89j4esc
+primary_entity:
+  entity: switch
+  name: Switch 1
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+secondary_entities:
+  - entity: switch
+    name: Switch 2
+    dps:
+      - id: 2
+        type: boolean
+        name: switch
+  - entity: number
+    name: Timer 1
+    icon: "mdi:timer"
+    category: config
+    dps:
+      - id: 7
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+        unit: min
+  - entity: number
+    name: Timer 2
+    icon: "mdi:timer"
+    category: config
+    dps:
+      - id: 8
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+        unit: min
+