ソースを参照

Add support for Sirena WS-902 plus siren

Issue #1920
Jason Rumney 1 年間 前
コミット
c681221c9c

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -580,3 +580,4 @@ Further device support has been made with the assistance of users. Please consid
 - [JackJackattack4](https://github.com/JackJackattack4) for assistance with Deakon EVI air to water heatpumps.
 - [dimasibs92](https://github.com/dimasibs92) for assistance with WL-898WZ water leak sensors.
 - [Motya-HA](https://github.com/Motya-HA) for assistance with a second variant of ZY-M100-Wifi presence sensor.
+- [Drummingman](https://github.com/Drummingman) for assistance with Sirena WS902 plus siren.

+ 1 - 0
DEVICES.md

@@ -606,6 +606,7 @@ work reliably, even if listed below.
 - Iebeyond ECH doorbell with 433MHz RF hub
 - 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
 
 ### Doorbells
 

+ 77 - 0
custom_components/tuya_local/devices/sirena_ws902plus_siren.yaml

@@ -0,0 +1,77 @@
+name: Outdoor siren
+# products:
+#    name: Sirena Outdoor Strobe Siren WS-902 Plus
+primary_entity:
+  entity: siren
+  dps:
+    - id: 1
+      name: tone
+      type: string
+      mapping:
+        - dps_val: alarm_sound
+          value: sound
+        - dps_val: alarm_light
+          value: light
+        - dps_val: alarm_sound_light
+          value: sound+light
+          default: true
+        - dps_val: normal
+          value: "off"
+    - id: 5
+      name: volume_level
+      type: string
+      mapping:
+        - dps_val: mute
+          value: 0.0
+        - dps_val: low
+          value: 0.33
+        - dps_val: middle
+          value: 0.67
+        - dps_val: high
+          value: 1.0
+    - id: 7
+      name: duration
+      type: integer
+      range:
+        min: 1
+        max: 59
+      unit: min
+secondary_entities:
+  - entity: binary_sensor
+    category: diagnostic
+    class: battery_charging
+    dps:
+      - id: 6
+        name: sensor
+        type: boolean
+  - entity: sensor
+    category: diagnostic
+    class: battery
+    dps:
+      - id: 13
+        name: sensor
+        type: string
+        unit: "%"
+        mapping:
+          - dps_val: low
+            value: 20
+          - dps_val: middle
+            value: 50
+          - dps_val: high
+            value: 80
+  - entity: switch
+    name: Silent
+    icon: "mdi:volume-mute"
+    category: config
+    dps:
+      - id: 16
+        type: boolean
+        name: switch
+  - entity: binary_sensor
+    name: Tamper detect
+    category: diagnostic
+    class: tamper
+    dps:
+      - id: 18
+        name: sensor
+        type: boolean