Procházet zdrojové kódy

Merge remote-tracking branch 'remotes/vampywiz17/main'

Jason Rumney před 4 roky
rodič
revize
377b5b2988

+ 84 - 0
custom_components/tuya_local/devices/digoo_dgsp202.yaml

@@ -0,0 +1,84 @@
+name: DIGOO DG-SP202
+primary_entity:
+  entity: switch
+  class: outlet 1
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+    - id: 19
+      type: integer
+      name: current_power_w
+      readonly: true
+      mapping:
+        - scale: 10
+secondary_entities:
+  - entity: switch
+    name: outlet 2
+    class: switch
+    dps:
+      - id: 2
+        type: boolean
+        name: switch
+  - entity: sensor
+    category: diagnostic
+    class: voltage
+    name: Voltage
+    dps:
+      - id: 20
+        name: sensor
+        type: integer
+        class: measurement
+        unit: V
+        mapping:
+          - scale: 10
+  - entity: sensor
+    category: diagnostic
+    class: current
+    name: Current
+    dps:
+      - id: 18
+        name: sensor
+        type: integer
+        class: measurement
+        unit: mA
+  - entity: sensor
+    category: diagnostic
+    class: power
+    name: Power
+    dps:
+      - id: 19
+        name: sensor
+        type: integer
+        class: measurement
+        unit: W
+        mapping:
+          - scale: 10
+  - entity: number
+    category: config
+    name: Timer 1
+    icon: "mdi:timer"
+    dps:
+      - id: 9
+        name: value
+        type: integer
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: number
+    category: config
+    name: Timer 2
+    icon: "mdi:timer"
+    dps:
+      - id: 10
+        name: value
+        type: integer
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60

+ 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

+ 83 - 0
custom_components/tuya_local/devices/woox_r4028_powerstrip.yaml

@@ -0,0 +1,83 @@
+name: Woox R4028 + DIGOO DG-PS01
+primary_entity:
+  entity: switch
+  name: outlet 1
+  class: switch
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+secondary_entities:
+  - entity: switch
+    name: outlet 2
+    class: switch
+    dps:
+      - id: 2
+        type: boolean
+        name: switch
+  - entity: switch
+    name: outlet 3
+    class: switch
+    dps:
+      - id: 3
+        type: boolean
+        name: switch
+  - entity: switch
+    name: USB switch
+    class: switch
+    dps:
+      - id: 7
+        type: boolean
+        name: switch
+  - entity: number
+    category: config
+    name: Timer 1
+    dps:
+      - id: 101
+        name: value
+        type: integer
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: number
+    category: config
+    name: Timer 2
+    dps:
+      - id: 102
+        name: value
+        type: integer
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: number
+    category: config
+    name: Timer 3
+    dps:
+      - id: 103
+        name: value
+        type: integer
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: number
+    category: config
+    name: USB Timer
+    dps:
+      - id: 105
+        name: value
+        type: integer
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60

+ 10 - 0
custom_components/tuya_local/translations/en.json

@@ -61,6 +61,8 @@
 		    "number_timer": "Include timer as a number entity",
 		    "number_timer_1": "Include timer 1 as a number entity",
 		    "number_timer_2": "Include timer 2 as a number entity",
+		    "number_timer_3": "Include timer 3 as a number entity",
+		    "number_usb_timer": "Include timer USB as a number entity",
 		    "select_configuration": "Include configuration as a select entity",
 		    "select_initial_state": "Include initial state as a select entity",
 		    "select_installation": "Include installation as a select entity",
@@ -99,8 +101,11 @@
 		    "switch_ionizer": "Include ionizer as a switch entity",
 		    "switch_master": "Include master switch as a switch entity",
 		    "switch_open_window_detector": "Include open window detect as a switch entity",
+		    "switch_outlet": "Include outlet as a switch entity",
 		    "switch_outlet_1": "Include outlet 1 as a switch entity",
 		    "switch_outlet_2": "Include outlet 2 as a switch entity",
+		    "switch_outlet_3": "Include outlet 3 as a switch entity",
+		    "switch_usb_switch": "Include USB as a switch entity",
 		    "switch_overcharge_cutoff": "Include overcharge cutoff as a switch entity",
 		    "switch_sleep": "Include sleep mode as a switch entity",
 		    "switch_sound": "Include sound mute as a switch entity",
@@ -162,6 +167,8 @@
 		    "number_timer": "Include timer as a number entity",
 		    "number_timer_1": "Include timer 1 as a number entity",
 		    "number_timer_2": "Include timer 2 as a number entity",
+		    "number_timer_3": "Include timer 3 as a number entity",
+		    "number_usb_timer": "Include timer USB as a number entity",
 		    "select_configuration": "Include configuration as a select entity",
 		    "select_initial_state": "Include initial state as a select entity",
 		    "select_installation": "Include installation as a select entity",
@@ -200,8 +207,11 @@
 		    "switch_ionizer": "Include ionizer as a switch entity",
 		    "switch_master": "Include master switch as a switch entity",
 		    "switch_open_window_detector": "Include open window detect as a switch entity",
+		    "switch_outlet": "Include outlet as a switch entity",
 		    "switch_outlet_1": "Include outlet 1 as a switch entity",
 		    "switch_outlet_2": "Include outlet 2 as a switch entity",
+		    "switch_outlet_3": "Include outlet 3 as a switch entity",
+		    "switch_usb_switch": "Include USB as a switch entity",
 		    "switch_overcharge_cutoff": "Include overcharge cutoff as a switch entity",
 		    "switch_sleep": "Include sleep mode as a switch entity",
 		    "switch_sound": "Include sound mute as a switch entity",