Преглед изворни кода

feat (devices): add Kerui 120dB siren alarm

Issue #4046
Jason Rumney пре 2 месеци
родитељ
комит
999747ff79
3 измењених фајлова са 170 додато и 0 уклоњено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 168 0
      custom_components/tuya_local/devices/kerui_120db_sirenalarm.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1138,3 +1138,4 @@ Further device support has been made with the assistance of users. Please consid
 - [george-oniceag](https://github.com/george-oniceag) for contributing support for AlecoAir PU55 Humino humidifier.
 - [yurgh](https://github.com/yurgh) for contributing improvements to Eeese Carl dehumidifier.
 - [fredppm](https://github.com/fredppm) for contributing support for Newpet pet feeder.
+- [politician](https://github.com/politician) for assisting with support for Kerui 120dB siren alarm.

+ 1 - 0
DEVICES.md

@@ -956,6 +956,7 @@ port and password.
 - Digoo DG-HAMB GSM security alarm system
 - GauTone PG-103 security alarm system
 - HLG Infinity alarm
+- Kerui 120dB siren alarm
 - Smart alarm siren (unbranded)
 - Staniot smart security panel
 - Tolviviov DP-W2.1 security alarm panel

+ 168 - 0
custom_components/tuya_local/devices/kerui_120db_sirenalarm.yaml

@@ -0,0 +1,168 @@
+name: Alarm siren
+products:
+  - id: nzopxptg7wxjnnan
+    manufacturer: Kerui
+    model: 120dB siren alarm
+entities:
+  - entity: alarm_control_panel
+    dps:
+      - id: 1
+        type: string
+        name: alarm_state
+        mapping:
+          - dps_val: disarmed
+            value: disarmed
+          - dps_val: arm
+            value: armed_away
+          - dps_val: home
+            value: armed_home
+          - dps_val: sos
+            value: triggered
+      - id: 40
+        type: string
+        name: unknown_40
+  - entity: number
+    name: Exit delay
+    icon: "mdi:clock-out"
+    class: duration
+    category: config
+    dps:
+      - id: 2
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 99
+  - entity: number
+    name: Siren duration
+    class: duration
+    category: config
+    icon: "mdi:bullhorn"
+    dps:
+      - id: 3
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 1
+          max: 5
+  - entity: switch
+    name: Alarm sound
+    icon: "mdi:alarm-bell"
+    category: config
+    dps:
+      - id: 4
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Alarm light
+    icon: "mdi:alarm-light"
+    category: config
+    dps:
+      - id: 6
+        type: boolean
+        name: switch
+  - entity: binary_sensor
+    class: plug
+    category: diagnostic
+    dps:
+      - id: 15
+        type: boolean
+        name: sensor
+  - entity: button
+    name: Mute
+    icon: "mdi:volume-mute"
+    dps:
+      - id: 25
+        type: boolean
+        optional: true
+        name: button
+  - entity: event
+    name: Alarm
+    dps:
+      - id: 26
+        type: string
+        name: event
+        optional: true
+        mapping:
+          - dps_val: null
+            value: null
+          - value: alarm
+      - id: 26
+        type: utf16b64
+        optional: true
+        name: message
+  - entity: switch
+    name: Notifications
+    icon: "mdi:message-alert"
+    category: config
+    dps:
+      - id: 27
+        type: boolean
+        name: switch
+  - entity: number
+    name: Entry delay
+    category: config
+    class: duration
+    icon: "mdi:clock-in"
+    dps:
+      - id: 28
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 200
+  - entity: switch
+    name: Delay sound
+    icon: "mdi:progress-alert"
+    category: config
+    dps:
+      - id: 29
+        type: boolean
+        optional: true
+        name: switch
+  - entity: binary_sensor
+    class: sound
+    name: Alarm
+    category: diagnostic
+    dps:
+      - id: 32
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: alarm
+            value: true
+          - value: false
+      - id: 33
+        type: string
+        optional: true
+        name: info
+  - entity: button
+    translation_key: factory_reset
+    hidden: true
+    category: config
+    dps:
+      - id: 34
+        type: boolean
+        optional: true
+        name: button
+  - entity: text
+    name: Subdevice admin
+    category: config
+    icon: "mdi:cogs"
+    hidden: true
+    dps:
+      - id: 38
+        type: base64
+        optional: true
+        name: value
+  - entity: binary_sensor
+    name: SOS
+    class: safety
+    category: diagnostic
+    dps:
+      - id: 44
+        type: boolean
+        name: sensor