Xiaomi Vacuum cleaner Card

Is there a thread for this card?
I have a Neato B6 and I can’t get it to show the Cleaning stats (Cleaned Area and Cleaning time).

1 Like

Hello, I am thinking of getting myself a Xiaomi Viomi v3. Anyone know if it would be compatible with Home Assistant and/or the Xiaomi Mi Robot Vacuum integration?

HI @Hellcube can you confirm which integration you use for the vacuum ? miio2 ?

I was able to do some integration you do but not all
like LED, locate seems not working on my vacuum styj02ym

Also all infos like filter, mop not show information

Thanks for your help

Capture-d-e-cran-2020-07-13-a-15-34-31

i have used miio2.

Hello comunity.
I cannot manage to launch the vacum script with the card.
Here is my script:

salle_a_manger:
  alias: test
  icon: mdi:table-chair
  sequence:
  - data:
      command: app_zoned_clean
      params:
      - - 23081
        - 20668
        - 28131
        - 27218
        - 1
    entity_id: vacuum.xiaomi_vacuum_cleaner
    service: vacuum.send_command

And here th code for de card:

actions:
  - icon: 'mdi:table-chair'
    name: test
    Service: script.00000000000001
  - icon: 'mdi:silverware-fork-knife'
    name: Cuisine
    service: script.Cuisine
  - icon: 'mdi:shoe-formal'
    name: Couloir
    service: script.Couloir
  - icon: 'mdi:sofa'
    name: Salon
    service: script.salon
entity: vacuum.xiaomi_vacuum_cleaner
stats:
  cleaning:
    - attribute: cleaned_area
      subtitle: Cleaning area
      unit: m2
    - attribute: cleaning_time
      subtitle: Cleaning time
      unit: minutes
  default:
    - attribute: filter_left
      subtitle: Filter
      unit: hours
    - attribute: side_brush_left
      subtitle: Side brush
      unit: hours
    - attribute: main_brush_left
      subtitle: Main brush
      unit: hours
    - attribute: sensor_dirty_left
      subtitle: Sensors
      unit: hours
type: 'custom:vacuum-card'

image
But when i click the button nothing happen.

1 Like

Hi there!
Here is my Xiaomi Vacuum clean Card.

If you like it, it’s available here:

3 Likes

So what part is the code? It looks amazing but i can’t find it on the github @Abeksis

Hola.
Conseguiste arreglar el problema del valor del fan_speed.
Yo poseo el mismo problema.
Un saludo.

Link fixed (moved to pastebin.com old pastebin.pl is down).

Hello
I have a problem, it does not work until the end, the card does not work, the buttons and the selection of rooms, which may be caused by I did according to the instructions

Did You add this to You configuration.yaml?

input_select:
  vacuum_room:
    name: Choose a room
    options:
      - Which room to vacuum
      - Room1
      - Room2
      - Room3
      - Room4

so added and the buttons only work start, stop, pauza, go to Home

Friends! How to “geolocate” the vacuum cleaner in the form of a list if the coordinates of the rooms are known?
For example, if the robot is in zone [11111, 22222, 33333, 4444, 1] while cleaning, the message “Bedroom” is returned, [55555, 66666, 77777, 88888, 1] - “Living room”, etc.?

Great job @Hellcube.
Maybe its stupid question, but why I have black colour of font?

And same situation like others, not all integration worked for me.
Do You guys have some solution for that?

obraz

Im using black theme (custom) so the font color is changed to white as default.
If you use the standard theme it is black default.
You would have to add (color: white;) to your style…

Thank You @Hellcube
i noticed it after a while a changed color to white. But im strugling still with fan speed button and brushes % values. To be sure, You are using code that You posted here, You have styj02ym and You are using this GitHub - nqkdev/home-assistant-vacuum-styj02ym code to connect to it (maybe You fored it and changed something, or used from another source)? Because i dont know where I have error with that:(
Once again thank You for help.

@Hellcube
I have Xiaomi Vacuum Mop Pro / STYJ02YM i used your code and it looks amazing.
But I have problem with using “Choose room option” neverthless what I choose it starts cleaning whole flat. If i go to Configuration->Scripts and run single script It goes to selected room (had to test some numbers to get correct rooms but now it’s ok)
Also I am not sure but looks like 1,2,3 icons do nothing.

Edit: Ok I have managed this problem (propably wrong YAML formatting - no errors but problems).
Now it works

When I go to services and fill in:

service: Vacuum.send_command
Entity: vacuum.name

And as service data:

{
  "entity_id": "vacuum.name",
  "command": "reset_consumable",
  "params": [main_brush_work_time]
}

This does work like a charm.

But I want to have a button in Home Assistant to perform this action, and I can’t get it to work.

This is my script:

  vacuummainbrush:
    alias: "Reset main brush"
    sequence:
      - service: vacuum.send_command
        data_template:
          entity_id: vacuum.name
          command: reset_consumable
          params: main_brush_work_time

So… What I did at this time to get this working:

Made a script in scripts.yaml:

 vacuummainbrush:
    alias: "vacuummainbrush"
    sequence:
      - service: vacuum.send_command
        data_template:
          {
            "entity_id": "vacuum.sucker",   # Don't mind my vacuum's name :)
            "command": "reset_consumable",
            "params": [main_brush_work_time]
          }

And I did add this to my card:

type: horizontal-stack
cards:
  - type: entity-button
    name: Borstel
    entity: script.vacuummainbrush
    icon: 'mdi:broom'
    tap_action:
      action: call-service
      service: script.vacuummainbrush

This way you can have multiple entity-buttons to run the script next to each other.