Explorar el Código

ZX G30 alarm: add names to prviously unknown dps

Split out known functions into entities.
Correct charge_state to be binary sensor, not switch.

Issue #1673
Jason Rumney hace 2 años
padre
commit
4d359f9cf4
Se han modificado 1 ficheros con 49 adiciones y 24 borrados
  1. 49 24
      custom_components/tuya_local/devices/zx_g30_alarm.yaml

+ 49 - 24
custom_components/tuya_local/devices/zx_g30_alarm.yaml

@@ -15,43 +15,44 @@ primary_entity:
           value: armed_away
         - dps_val: home
           value: armed_home
-    - id: 20
-      type: boolean
-      name: unknown_20
-    - id: 21
-      type: boolean
-      name: unknown_21
     - id: 22
       type: integer
-      name: unknown_22
+      name: call_looptimes
     - id: 23
       type: string
-      name: unknown_23
+      name: telnet_state
     - id: 24
       type: string
-      name: unknown_24
-    - id: 32
-      type: string
-      name: unknown_32
-    - id: 34
-      type: boolean
-      name: unknown_34
+      name: zone_attribute
     - id: 35
       type: boolean
-      name: unknown_35
+      name: sub_add
     - id: 36
       type: string
-      name: unknown_36
+      name: sub_class
     - id: 37
       type: string
-      name: unknown_37
+      name: sub_type
     - id: 39
       type: string
-      name: unknown_39
+      name: sub_state
     - id: 40
       type: string
-      name: unknown_40
+      name: master_language
 secondary_entities:
+  - entity: binary_sensor
+    name: Alarm
+    class: sound
+    icon: "mdi:alarm-bell"
+    dps:
+      - id: 32
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: normal
+            value: false
+          - dps_val: alarm
+            value: true
   - entity: button
     deprecated: alarm_control_panel
     category: config
@@ -134,14 +135,13 @@ secondary_entities:
       - id: 10
         type: boolean
         name: switch
-  - entity: switch
-    name: AC power
+  - entity: binary_sensor
+    class: plug
     category: config
-    icon: "mdi:current-ac"
     dps:
       - id: 15
         type: boolean
-        name: switch
+        name: sensor
   - entity: sensor
     class: battery
     dps:
@@ -157,6 +157,22 @@ secondary_entities:
       - id: 17
         type: boolean
         name: sensor
+  - entity: switch
+    name: Alarm call
+    category: config
+    icon: "mdi:phone-alert"
+    dps:
+      - id: 20
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Alarm SMS
+    category: config
+    icon: "mdi:message-alert"
+    dps:
+      - id: 21
+        type: boolean
+        name: switch
   - entity: switch
     name: Alarm notification
     category: config
@@ -182,3 +198,12 @@ secondary_entities:
       - id: 29
         type: boolean
         name: switch
+  - entity: button
+    name: Factory reset
+    class: restart
+    category: config
+    dps:
+      - id: 34
+        type: boolean
+        name: button
+