Przeglądaj źródła

fix(haozee_cogasleak_detector): fix dps indexing

- Test is dp 104, not 103, and should be optional
- Self test should be a button, not a switch, and optional
- Checking result should also be optional

Issue #4992
Jason Rumney 1 miesiąc temu
rodzic
commit
de5abf912f

+ 7 - 3
custom_components/tuya_local/devices/haozee_cogasleak_detector.yaml

@@ -2,15 +2,18 @@ name: Gas and CO detector
 products:
   - id: piuvzdlag3zsiqjk
     manufacturer: Haozee
+  - id: zbuq0bto5szi53cw
+    manufacturer: Haozee
 entities:
-  - entity: switch
+  - entity: button
     name: Self check
     icon: "mdi:check-circle"
     category: config
     dps:
       - id: 18
         type: boolean
-        name: switch
+        optional: true
+        name: button
   - entity: sensor
     name: Self check result
     class: enum
@@ -18,6 +21,7 @@ entities:
     dps:
       - id: 19
         type: string
+        optional: true
         name: sensor
         mapping:
           - dps_val: checking
@@ -160,7 +164,7 @@ entities:
   - entity: event
     name: Test
     dps:
-      - id: 103
+      - id: 104
         type: boolean
         name: event
         optional: true