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

Add support for SH07-8 sprinkler controller

Issue #496

As the webpage listed 4, 6, and 8 sprinkler variants of the
controller, I made valve's 5 and up optional in the optimistic
assumption that those variants use the same dp mapping with fewer
valves.
Jason Rumney 2 лет назад
Родитель
Сommit
0d05746345

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -234,3 +234,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [antonio1475](https://github.com/antonio1475) for contributing support for Rojeco pet feeders.
 - [erelke](https://github.com/erelke) for contributing Hungarian translations.
 - [p-owerscripter](https://github.com/p-owerscripter) for contributing support for KKMoon air quality monitors.
+- [cataseven](https://github.com/cataseven) for contributing support for SM07-8 sprinkler controllers.

+ 1 - 0
DEVICES.md

@@ -349,6 +349,7 @@ of device.
 - Rojeco PTM-001 pet feeder
 - Qoto 03 smart water valve / sprinkler controller
 - SD123 HPR01 human presence radar
+- SH07-8 smart sprinkler controller
 - Universal remote control (supports sensors only)
 - Yieryi water quality monitor (also matches unbranded PH-W3988 device)
 - ZX-G30 alarm system (not as an alarm_control_panel, as individual inputs and sensors)

+ 66 - 0
custom_components/tuya_local/devices/sh07_sprinkler_controller.yaml

@@ -0,0 +1,66 @@
+name: Sprinkler controller
+product:
+  - id: e8fwsklivj87msao
+    name: Smart Sprinkler Controller
+primary_entity:
+  entity: switch
+  name: Valve 1
+    icon: "mdi:pipe-valve"
+  dps:
+    - id: 101
+      name: switch
+      type: boolean
+secondary_entities:
+  - entity: switch
+    name: Valve 2
+    icon: "mdi:pipe-valve"
+    dps:
+      - id: 102
+        name: switch
+        type: boolean
+  - entity: switch
+    name: Valve 3
+    icon: "mdi:pipe-valve"
+    dps:
+      - id: 103
+        name: switch
+        type: boolean
+  - entity: switch
+    name: Valve 4
+    icon: "mdi:pipe-valve"
+    dps:
+      - id: 104
+        name: switch
+        type: boolean
+  - entity: switch
+    name: Valve 5
+    icon: "mdi:pipe-valve"
+    dps:
+      - id: 105
+        name: switch
+        type: boolean
+        optional: true
+  - entity: switch
+    name: Valve 6
+    icon: "mdi:pipe-valve"
+    dps:
+      - id: 106
+        name: switch
+        type: boolean
+        optional: true
+  - entity: switch
+    name: Valve 7
+    icon: "mdi:pipe-valve"
+    dps:
+      - id: 110
+        name: switch
+        type: boolean
+        optional: true
+  - entity: switch
+    name: Valve 8
+    icon: "mdi:pipe-valve"
+    dps:
+      - id: 111
+        name: switch
+        type: boolean
+        optional: true