Jelajahi Sumber

Add Aubess switch with energy monitoring

Issue #277
Jason Rumney 3 tahun lalu
induk
melakukan
087ee1fea8

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -136,3 +136,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [eutampieri](https://github.com/eutampieri) for assistance supporting for a simpler RGBCW lightbulb without timer.
 - [sindrebroch](https://github.com/sindrebroch) for assistance supporting Catit pet feeder.
 - [presslab-us](https://github.com/presslab-us) for assistance supporting Daizuki heatpumps and improving the almost compatible Starlink heatpump.
+- [filipole](https://github.com/filipole) for assistance supporting Aubess switch with energy monitoring.

+ 1 - 0
DEVICES.md

@@ -157,6 +157,7 @@
 - Generic triple and quad switches (confirmed with Songam wall switches)
 - 4 way power monitoring strip
 - Arlec PB88UHA 4 way powerstrip with child lock
+- Aubess 1-gang switch with energy monitoring
 - Aubess 2-gang switch
 - DIGOO DG-SP202 dual smartplug with energy monitoring and timers.
 - DIGOO DG-SP01 USB smartplug with night light.

+ 93 - 0
custom_components/tuya_local/devices/aubess_1gang_switch.yaml

@@ -0,0 +1,93 @@
+name: Aubess energy monitor switch
+primary_entity:
+  entity: switch
+  dps:
+    - id: 1
+      name: switch
+      type: boolean
+    - id: 24
+      name: test_bit
+      type: integer
+    - id: 42
+      name: random_time
+      type: string
+    - id: 43
+      name: cycle_time
+      type: string
+    - id: 44
+      name: switch_inching
+      type: string
+secondary_entities:
+  - entity: number
+    name: Timer
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 9
+        name: value
+        type: integer
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: select
+    name: Restore power state
+    category: config
+    icon: "mdi:toggle-switch"
+    dps:
+      - id: 38
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: "Off"
+          - dps_val: "1"
+            value: "On"
+          - dps_val: "2"
+            value: Remember last state
+  - entity: sensor
+    name: Energy
+    category: diagnostic
+    class: energy
+    dps:
+      - id: 20
+        name: sensor
+        type: integer
+        class: total_increasing
+        unit: Wh
+  - entity: sensor
+    name: Current
+    class: current
+    category: diagnostic
+    dps:
+      - id: 21
+        name: sensor
+        type: integer
+        class: measurement
+        unit: mA
+  - entity: sensor
+    name: Power
+    class: power
+    category: diagnostic
+    dps:
+      - id: 22
+        name: sensor
+        type: integer
+        class: measurement
+        unit: W
+        mapping:
+          - scale: 10
+  - entity: sensor
+    name: Voltage
+    class: voltage
+    category: diagnostic
+    dps:
+      - id: 23
+        name: sensor
+        type: integer
+        class: measurement
+        unit: V
+        mapping:
+          - scale: 10

+ 1 - 1
custom_components/tuya_local/devices/aubess_2gang_switch.yaml

@@ -56,7 +56,7 @@ secondary_entities:
   - entity: select
     name: Restore power state
     category: config
-    icon: 
+    icon: "mdi:toggle-switch"
     dps:
       - id: 38
         type: string