Browse Source

Add support for Energy Monitor 2 Gang Switch Module (LoraTap RR620W-JL)

https://www.loratap.com/products/rr500w-jl
neilflatley 1 year ago
parent
commit
9c4ffaa253
1 changed files with 124 additions and 0 deletions
  1. 124 0
      custom_components/tuya_local/devices/energy_monitor_2gang_switch.yaml

+ 124 - 0
custom_components/tuya_local/devices/energy_monitor_2gang_switch.yaml

@@ -0,0 +1,124 @@
+name: Energy Monitor 2 Gang Switch Module
+products:
+  - id: keyjnuy4s3kre7m7
+    name: LoraTap RR620W-JL
+primary_entity:
+  entity: switch
+  name: Switch 1
+  dps:
+    - id: 1
+      name: switch
+      type: boolean
+    - id: 42
+      name: random_time
+      type: string
+    - id: 43
+      name: cycle_time
+      type: string
+secondary_entities:
+  - entity: switch
+    name: Switch 2
+    dps:
+      - id: 2
+        name: switch
+        type: boolean
+  - entity: number
+    name: Timer 1
+    translation_key: timer
+    category: config
+    dps:
+      - id: 9
+        name: value
+        type: integer
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: number
+    name: Timer 2
+    translation_key: timer
+    category: config
+    dps:
+      - id: 10
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: select
+    translation_key: initial_state
+    category: config
+    dps:
+      - id: 38
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: "off"
+          - dps_val: "1"
+            value: "on"
+          - dps_val: "2"
+            value: memory
+  - entity: select
+    name: Switch type
+    icon: "mdi:toggle-switch"
+    category: config
+    dps:
+      - id: 47
+        type: string
+        name: option
+        mapping:
+          - dps_val: flip
+            value: Flip
+          - dps_val: sync
+            value: Synchronized
+          - dps_val: button
+            value: Button
+  - entity: sensor
+    name: Energy
+    category: diagnostic
+    dps:
+      - id: 20
+        name: sensor
+        type: integer
+        optional: true
+        unit: Wh
+  - entity: sensor
+    class: current
+    category: diagnostic
+    dps:
+      - id: 21
+        name: sensor
+        type: integer
+        class: measurement
+        force: true
+        unit: mA
+  - entity: sensor
+    class: power
+    category: diagnostic
+    dps:
+      - id: 22
+        name: sensor
+        type: integer
+        class: measurement
+        force: true
+        unit: W
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: voltage
+    category: diagnostic
+    dps:
+      - id: 23
+        name: sensor
+        type: integer
+        force: true
+        class: measurement
+        unit: V
+        mapping:
+          - scale: 10