Forráskód Böngészése

PG103/107 alarm: undeprecate alarm binary sensor

Going through the history of issues about this device, it seems that using
dp 32 as the alarm trigger and attaching alarm message (dp 26) to the event
is problematics, because dp 26 seems to come through on its own, so will not
be present on the status reply that the dp 32 trigger is reported on.

So it is better to use dp 26 itself as the event trigger, and go back to using
a binary sensor for dp 32, which does seem to be always reported as a current
status of the alarm siren.

Power does seem to have been converted to an event deliberately, as a user
reported that it never reports normal again after reporting powerDisconnect,
so it is only useful for reporting a powerDisconnect or low battery event.

Issue #3272
Jason Rumney 1 éve
szülő
commit
d962c0da6f

+ 3 - 11
custom_components/tuya_local/devices/gautone_pg103_alarm.yaml

@@ -105,8 +105,6 @@ entities:
         name: switch
   - entity: binary_sensor
     class: sound
-    # 2025-01-05
-    deprecated: event.alarm
     name: Alarm
     category: diagnostic
     dps:
@@ -118,22 +116,16 @@ entities:
             value: false
           - dps_val: alarm
             value: true
-      - id: 26
-        type: base64
-        name: message
-        optional: true
-        persist: false
   - entity: event
     name: Alarm
     dps:
-      - id: 32
+      - id: 26
         type: string
         name: event
         mapping:
-          - dps_val: normal
+          - dps_val: null
             value: null
-          - dps_val: alarm
-            value: alarm
+          - value: alarm
       - id: 26
         type: utf16b64
         name: message