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

Add another variant of simple dual switch with timers.

This differs only by the dp ids for the timers (9, 10 instead of 7, 8 - which
seems to be the more common mapping for switch timers).  Matches Avatto branded
dual switch, but likely others as well.

Issue #293
Jason Rumney 3 лет назад
Родитель
Сommit
03d7d401aa

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -144,4 +144,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [billxinli](https://github.com/billxinli) for contributing support for Honeywell TP dehumidifiers.
 - [isarib01](https://github.com/isarib01) for assistance supporting Deta motion sensor lights.
 - [iDontWantAUsername](https://github.com/iDontWantAUsername) for assistance supporting Grid Connect USB charger with power socket.
-- [engusz](https://github.com/engusz) for assistance supporting Avatto curtain switches.
+- [engusz](https://github.com/engusz) for assistance supporting Avatto curtain switches and dual switch with timers.

+ 1 - 1
DEVICES.md

@@ -156,7 +156,7 @@
   _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 double switch with timers (confirmed with Living dual switch and another v2 variant with Avatto dual switch)
 - Generic triple and quad switches (confirmed with Songam wall switches)
 - 4 way power monitoring strip
 - Arlec PB88UHA 4 way powerstrip with child lock

+ 46 - 0
custom_components/tuya_local/devices/simple_dual_switch_timer_v2.yaml

@@ -0,0 +1,46 @@
+name: Dual switch with timers
+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: 9
+        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: 10
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+        unit: min
+