Selaa lähdekoodia

Weaja S9 gas alarm: fix minor issues

- Mute button does not work, so logic reversed
- Carbon monoxide was marked as diagnostic, inconsistent with other sensors.
- Alarm time resets to 0 on startup due to null mapping to 0.
  Changed to show as unknown instead.

Issue #2434
Jason Rumney 1 vuosi sitten
vanhempi
commit
abc955d926
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 5
      custom_components/tuya_local/devices/weaja_s9_gasalarm.yaml

+ 5 - 5
custom_components/tuya_local/devices/weaja_s9_gasalarm.yaml

@@ -27,10 +27,6 @@ entities:
         range:
           min: 0
           max: 60
-        mapping:
-          - dps_val: null
-            value: 0
-            hidden: true
       # dp 12 is labelled as switch_alarm, but does not appear to work, so
       # possibly just an indicator of some sort. Left as an attribute until
       # it can be figured out.
@@ -67,9 +63,13 @@ entities:
         type: boolean
         name: button
         optional: true
+        mapping:
+          - dps_val: false
+            value: true
+          - dps_val: true
+            value: false
   - entity: sensor
     class: carbon_monoxide
-    category: diagnostic
     dps:
       - id: 20
         type: integer