فهرست منبع

Add support for STL siren

Issue #2350
Jason Rumney 1 سال پیش
والد
کامیت
2da572e3cf
3فایلهای تغییر یافته به همراه73 افزوده شده و 0 حذف شده
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 71 0
      custom_components/tuya_local/devices/stl_siren.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -700,3 +700,4 @@ Further device support has been made with the assistance of users. Please consid
 - [cabmoomoo](https://github.com/cabmoomoo) for contributing support for Enbrighten curtain lights.
 - [eldi0s](https://github.com/eldi0s) for contributing support for Kesser IR heater with flood lights.
 - [willieseabrook](https://github.com/willieseabrook) for contributing support for Kogan KASMGPH glass panel heater.
+- [VladimirTuzovGitHub](https://github.com/VladimirTuzovGitHub) for assisting with support for STL siren.

+ 1 - 0
DEVICES.md

@@ -688,6 +688,7 @@ work reliably, even if listed below.
 - Neo Coolcam Siren with temperature and humidity alert (NAS-AB02W)
 - Orion Grid Connect outdoor siren (also Elesion NX-4980)
 - Sirena WS-902 Plus outdoor strobe siren
+- STL siren
 
 ### Doorbells
 

+ 71 - 0
custom_components/tuya_local/devices/stl_siren.yaml

@@ -0,0 +1,71 @@
+name: Siren
+products:
+  - id: DYgId0sz6zWlmmYu
+    name: STL siren alarm
+primary_entity:
+  entity: siren
+  dps:
+    - id: 102
+      type: string
+      name: tone
+      mapping:
+        - dps_val: "1"
+          value: "Alarm 1"
+        - dps_val: "2"
+          value: "Alarm 2"
+        - dps_val: "3"
+          value: "Alarm 3"
+        - dps_val: "4"
+          value: "Alarm 4"
+        - dps_val: "5"
+          value: "Alarm 5"
+        - dps_val: "6"
+          value: "Alarm 6"
+        - dps_val: "7"
+          value: "Alarm 7"
+        - dps_val: "8"
+          value: "Alarm 8"
+        - dps_val: "9"
+          value: "Alarm 9"
+        - dps_val: "10"
+          value: "Alarm 10"
+    - id: 103
+      type: integer
+      name: duration
+      range:
+        min: 0
+        max: 60
+    - id: 104
+      type: boolean
+      name: switch
+secondary_entities:
+  - entity: sensor
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 101
+        type: string
+        name: sensor
+        unit: "%"
+        mapping:
+          - dps_val: "0"
+            value: 100
+          - dps_val: "1"
+            value: 75
+          - dps_val: "2"
+            value: 50
+          - dps_val: "3"
+            value: 25
+          - dps_val: "4"
+            value: null
+  - entity: binary_sensor
+    class: plug
+    category: diagnostic
+    dps:
+      - id: 101
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: "4"
+            value: true
+          - value: false