Vacuum Interactive Map Card

Thank you, that’s right, but the essence of the vacuum cleaner camera is still not there after the server reboot

Check logs

1 Like

I do not know in which section there should be errors in the logs. A custom card for controlling the vacuum cleaner can’t interfere?

A complete reboot with a power outage helped. Thanks.

1 Like

Hey Piotr,

sorry but i am to supid to get this work :stuck_out_tongue:

I have the xiaomi_cloud_map_extractor installed an your Frontend. The card itself is working so far BUT i can only choose Zone cleanup or pinandgo. I tried everything in your FAQs but there are error messages and its just not working. When i put the code into the Template Editor and change only the vacuum_entity i get the error: TypeError: argument of type ‘Room’ is not iterable
Next thing i tried was to make the card in the GUI and import the things which are “extra”. When i copy the 3 first lines into the card config there are new errors. I really dont get it…

Konfigurationsfehler erkannt:
missed comma between flow collection entries (1:2)

1 | {% set camera_entity = "camera.xi …
------^
2 | {% set vacuum_entity = "vacuum.ro …
3 | type: custom:xiaomi-vacuum-map-card

Perhaps its an easy thing but i have no clue.

P.S. i have added the rooms attribute to the camera config :smile:

You have to paste it to template evaluator in dev tools, copy output of evaluation and paste in card’s config. Oooor wait for next release of the card to make it fully automatically

When i copy it there, there is the TypeError: argument of type ‘Room’ is not iterable.

Perhaps i should wait for the new release :stuck_out_tongue:

I got it. I used the code from
weemaba999
then i get the code for the card and its working. Thx you guys for your work!!!

I am having the same issue: what did do exactly to fix the Room not iterable problem?

@wigster @Guard can you show attributes of map extractor entity after enabling rooms in it’s config?

Yes, I’ve just figred out that the problem is the fact that the room name is None. Here is the entity:

access_token: !secret
calibration_points:
  - vacuum:
      x: 25500
      'y': 25500
    map:
      x: 347
      'y': 414
  - vacuum:
      x: 26500
      'y': 25500
    map:
      x: 367
      'y': 414
  - vacuum:
      x: 25500
      'y': 26500
    map:
      x: 347
      'y': 394
rooms:
  '16':
    x0: 17550
    y0: 29250
    x1: 21700
    y1: 31350
  '17':
    x0: 15200
    y0: 23950
    x1: 19000
    y1: 31450
  '18':
    x0: 21500
    y0: 23500
    x1: 27100
    y1: 31400
  '19':
    x0: 21450
    y0: 27850
    x1: 21450
    y1: 28550
  '20':
    x0: 19050
    y0: 25250
    x1: 21400
    y1: 29300
  '21':
    x0: 14200
    y0: 31450
    x1: 17200
    y1: 37450
  '22':
    x0: 15500
    y0: 37450
    x1: 19050
    y1: 40450
  '23':
    x0: 13000
    y0: 37400
    x1: 15250
    y1: 39500
  '24':
    x0: 20200
    y0: 31400
    x1: 23100
    y1: 33300
  '25':
    x0: 17150
    y0: 32350
    x1: 18550
    y1: 34500
  '26':
    x0: 17200
    y0: 34000
    x1: 21500
    y1: 37300
model: roborock.vacuum.a15
used_api: xiaomi
entity_picture: !secret
friendly_name: Vacuum MrBobot Map
supported_features: 1

I have them set in the Xiaomi app, but they don’t propagate. Could be a result of my having used the Roborock app first, and then changing to Xiaomi to use your integration.

Ok, so did you got it working?

Right now they aren’t propagated automatically in the card, you have to configure them manually

I got it working by modifying the line:

          text: {{ iif("name" in room, room["name"], "Room " + room_id) }}

to just

text: {{"Room "+room_id|string}}
1 Like

Ok, thanks, I’ll adjust the template. Unfortunately my vacuum doesn’t support rooms, so I can’t test I by myself

Finally have set your card up and what a difference being able to talk to the vacuum locally!

One ideological question: in the Xiaomi app, I have each room set up with different defaults of fan/mop speed. So when I send the vacuum to do two rooms it will by default use these two different settings without my having to choose anything.

Is something like this possible here, whether by using the settings taken from the cloud (but maybe that is local to the phone app?) or by explicitly setting them somewhere in the card config?

Thanks!

There are 2 answers to this question:

  • If these settings are saved in the vacuum and there’s a way to start cleaning from HA using these, then it should be perfectly possible to do it from the card. I don’t know if there’s a way to start such cleaning from HA though

  • You can create a script that will set appropriate settings (fan/mop) based on selection and then start cleaning. I will try to make it easier in the next version of the card

Hi again

Another couple of questions as I tune the setup:

  • I’ve noticed that if I ask to repeat room vacuuming with multiple rooms the selection gets sent as [17,18,17,18] instead of [17,17,18,18]. The latter would make more sense to me (the vacuum is already there, so you save travel time) but maybe it’s an Xiaomi ibntefration requirement?

  • How can I change the colour of the text labels added to the rooms under the icons? I have dark mode and they are drawn in black, which is not very visible on my colour scheme.

Thanks!

hi everyone, i am trying to create an automation on whichever room my roborock s5 max goes for cleaning and in then particular room if motion sensor detects motion, vacuum will pause for two min and the resume on no motion. Can anyone please help?

Do you use Map Extractor? It can return currently cleaned room if you add vacuum_room to attributes section in its config.