Bläddra i källkod

RQ400A gas alarm: combine some entities to a siren

- combine tone, duration and alarm switch into a siren entity

PR #3261
Jason Rumney 8 månader sedan
förälder
incheckning
4be90772fd
1 ändrade filer med 7 tillägg och 33 borttagningar
  1. 7 33
      custom_components/tuya_local/devices/rq400a_gasalarm.yaml

+ 7 - 33
custom_components/tuya_local/devices/rq400a_gasalarm.yaml

@@ -27,14 +27,15 @@ entities:
         class: measurement
         mapping:
           - scale: 1
-  - entity: select
-    name: Alarm tone
-    icon: "mdi:siren"
+  - entity: siren
     category: config
     dps:
+      - id: 12
+        type: boolean
+        name: switch
       - id: 8
         type: string
-        name: option
+        name: tone
         mapping:
           - dps_val: "1"
             value: Alarm 1
@@ -46,14 +47,9 @@ entities:
             value: Alarm 4
           - dps_val: "5"
             value: Alarm 5
-  - entity: number
-    name: Alarm duration
-    category: config
-    icon: "mdi:camera-timer"
-    dps:
       - id: 3
         type: integer
-        name: value
+        name: duration
         unit: s
         range:
           min: 1
@@ -66,23 +62,9 @@ entities:
       - id: 9
         type: boolean
         name: button
-  - entity: sensor
-    name: Self-check result
-    class: enum
-    category: diagnostic
-    dps:
       - id: 1
         type: string
-        name: sensor
-        mapping:
-          - dps_val: checking
-            value: In progress
-          - dps_val: check_success
-            value: OK
-          - dps_val: check_failure
-            value: Fail!
-          - dps_val: others
-            value: Other
+        name: result
   - entity: binary_sensor
     name: Warm up
     class: cold
@@ -91,14 +73,6 @@ entities:
       - id: 10
         type: boolean
         name: sensor
-  - entity: switch
-    name: Alarm enable
-    icon: "mdi:siren"
-    category: config
-    dps:
-      - id: 12
-        type: boolean
-        name: switch
   - entity: switch
     name: Mute
     icon: "mdi:volume-mute"