Преглед изворни кода

Kabum vacuum: rename file with yaml extension.

- add vacuum to filename to help users recognize potential matches.
- shorten the name
- standardise command and status following other supported vacuums
  in particular command names are for send_command actions rather than
  the UI, so use underscores rather than spaces. Some statuses are
  recognised specially when determining the state, so use those and
  make others consistent with them (lower case, single words)
- add duration class to cleaning time sensor

PR #479
Jason Rumney пре 3 година
родитељ
комит
1378c0d1a7
3 измењених фајлова са 15 додато и 11 уклоњено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 13 11
      custom_components/tuya_local/devices/kabum_smart500_vacuum.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -201,3 +201,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [pvillanyi](https://github.com/pvillanyi) for contributing support for smartplugs with USB (Gosund SP112).
 - [jaichinger](https://github.com/jaichinger) for contributing support for Breville Smart Air Viral Protect Plus purifier.
 - [kytro](https://github.com/kytro) for assistaing with support for Anko smart kettles.
+- [Oglaf](https://github.com/Oglaf) for contributing support for Kabum Smart 500 vacuum cleaners.

+ 1 - 0
DEVICES.md

@@ -282,6 +282,7 @@ of device.
 
 ### Vacuum Cleaners
 
+- Kabum Smart 500 vacuum cleaner
 - Kyvol E30 vacuum cleaner
 - Lefant M213 vacuum cleaner (also works for Lefant M213S and APOSEN A550)
 

+ 13 - 11
custom_components/tuya_local/devices/kabum_smart_500 → custom_components/tuya_local/devices/kabum_smart500_vacuum.yaml

@@ -1,6 +1,7 @@
-name: Robô Aspirador de Pó KaBuM! Smart 500
+name: Kabum Smart 500
 products:
   - id: wexaeucvbdawkkpo
+    name: Robô Aspirador de Pó KaBuM! Smart 500
 primary_entity:
   entity: vacuum
   dps:
@@ -54,13 +55,13 @@ primary_entity:
         - dps_val: standby
           value: standby
         - dps_val: smart
-          value: Auto cleaning
+          value: smart
         - dps_val: spiral
           value: clean_spot
         - dps_value: single
-          value: Room cleaning
+          value: single_room
         - dps_val: wall_follow
-          value: Edge cleaning
+          value: wall_follow
         - dps_val: chargego
           value: return_to_base
     - id: 28
@@ -68,15 +69,15 @@ primary_entity:
       name: status
       mapping:
         - dps_val: cleanning
-          value: Cleanning
+          value: cleaning
         - dps_val: returning
-          value: Returning to dock
+          value: returning
         - dps_val: charging
-          value: Charging
+          value: charging
         - dps_val: standby
-          value: Standby
+          value: standby
         - dps_val: chargecompleted
-          value: Charge completed
+          value: charged
     - id: 29
       type: boolean
       name: locate
@@ -103,19 +104,20 @@ secondary_entities:
     name: Clean area
     category: diagnostic
     icon: "mdi:floor-plan"
-    optional: true
     dps:
       - id: 32
         type: integer
         name: sensor
+        optional: true
         unit: m2
   - entity: sensor
     name: Clean time
     category: diagnostic
+    class: duration
     icon: "mdi:clock-outline"
-    optional: true
     dps:
       - id: 33
         type: integer
         name: sensor
+        optional: true
         unit: min