Просмотр исходного кода

Gautone PG103/107 alarm: fix type for power sensor, add keytone

- Previous change incorrectly used boolean for power binary sensor when
the value is a string with two possible values.
- also noticed from the log that the config is missing dp 12, which based on
earlier device info from #961 is the keytone enable/disable switch

Issue #3272
Jason Rumney 9 месяцев назад
Родитель
Сommit
307e99845e
1 измененных файлов с 9 добавлено и 1 удалено
  1. 9 1
      custom_components/tuya_local/devices/gautone_pg103_alarm.yaml

+ 9 - 1
custom_components/tuya_local/devices/gautone_pg103_alarm.yaml

@@ -96,6 +96,14 @@ entities:
         type: boolean
         type: boolean
         name: switch
         name: switch
         optional: true
         optional: true
+  - entity: switch
+    translation_key: keytone
+    category: config
+    dps:
+      - id: 12
+        type: boolean
+        optional: true
+        name: switch
   - entity: switch
   - entity: switch
     name: Alarm notification
     name: Alarm notification
     category: config
     category: config
@@ -155,7 +163,7 @@ entities:
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 101
       - id: 101
-        type: boolean
+        type: string
         name: sensor
         name: sensor
         mapping:
         mapping:
           - dps_val: powerDisconnect
           - dps_val: powerDisconnect