Преглед изворни кода

Add timer function to simple switch.

I checked 4-5 brand of simple plug (without led or measuring) and it almost all only contain this two dp_id. I think this config help to use this switches all available local function. But also usefull that the original simple switch config is also remain, so i add it to a different name.
Vamp пре 4 година
родитељ
комит
5406e61251
1 измењених фајлова са 22 додато и 0 уклоњено
  1. 22 0
      custom_components/tuya_local/devices/simple_switch_timer.yaml

+ 22 - 0
custom_components/tuya_local/devices/simple_switch_timer.yaml

@@ -0,0 +1,22 @@
+name: Simple Switch With Timer
+primary_entity:
+  entity: switch
+  dps:
+    - id: 1
+      name: switch
+      type: boolean
+secondary_entities:
+  - entity: number
+    category: config
+    name: Timer
+    icon: "mdi:timer"
+    dps:
+      - id: 11
+        name: value
+        type: integer
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60