Răsfoiți Sursa

fix (siguro_apk50_purifier): add missing presets

Original issue #2700 mentioned these but wasn't supported by the device info
provided. Query Things Data Model from #4471 has them though.

- add translation_only_key to fan to pull in translations for presets
- make temperature_unit hidden. There is no temperature sensor exposed,
  so at best it is just a setting for the display, but it is not mentioned
  in the device info on #2700 or #4471 so its presence in the logs seems
  like just something accidentally left in by the developers.
Jason Rumney 5 zile în urmă
părinte
comite
8312bfa75b

+ 22 - 0
custom_components/tuya_local/devices/siguro_apk50_purifier.yaml

@@ -6,6 +6,7 @@ products:
     model_id: AP-K50
 entities:
   - entity: fan
+    translation_only_key: fan_with_presets
     dps:
       - id: 1
         type: boolean
@@ -18,6 +19,12 @@ entities:
             value: auto
           - dps_val: sleep
             value: sleep
+          - dps_val: "1"
+            value: low
+          - dps_val: "2"
+            value: medium
+          - dps_val: "3"
+            value: high
   - entity: sensor
     class: pm25
     dps:
@@ -76,6 +83,20 @@ entities:
             value: "4h"
           - dps_val: "5h"
             value: "5h"
+          - dps_val: "6h"
+            value: "6h"
+          - dps_val: "7h"
+            value: "7h"
+          - dps_val: "8h"
+            value: "8h"
+          - dps_val: "9h"
+            value: "9h"
+          - dps_val: "10h"
+            value: "10h"
+          - dps_val: "11h"
+            value: "11h"
+          - dps_val: "12h"
+            value: "12h"
   - entity: sensor
     translation_key: time_remaining
     class: duration
@@ -122,6 +143,7 @@ entities:
   - entity: select
     translation_key: temperature_unit
     category: config
+    hidden: true  # not documented, and no temperature readings
     dps:
       - id: 23
         type: string