Vacuum Interactive Map Card

You don’t need an android device to use flolevac. You can use an android emulator like nox. Which is the method I’ve used to get the coordinates.

Literally just grabbed it, thanks for the suggestion. I just figure since the zone cleanup feature within the card seems to work well it might have a way to present the coordinates? Since it needs the coordinates to send to the vac with the vacuum.send_command.

I thought about it recently, it shouldn’t be hard to implement :slight_smile:

1 Like

:smiley: a very welcome addition!

So flolevac is able to get the map while using an unrooted vacuum. Is this possible with HASS anyhow? As far as I know not possible as of now.

@talondnb I have just added this feature, you can check it out in the latest version of the card

@sendorm FloleVac downloads data from Xiaomi cloud, you can check out this thread: Add Map to Xiaomi vacuum cleaner

1 Like

Yes flolevac needs your mi account and password to do so. I was asking if that was possible, but in the thread you’ve provided it says that not as of yet. Thanks.

How does it work?

From github:

  • Enabling debug in settings, drawing zone in Zoned cleanup mode and holding Start button. Note: this method also works for other modes.

Once you’ve added the debug option, just hold down the Start button until the icon changes, then let go and a popup will appear with the coordinates.

1 Like

Hello,
At first I would like to thank you for a great plugin, I really appreciate your job!
I guess I experience the same issue that @Dernebo described before.
The height of the map is to big on iPhone (either in Safari or HA application, it’s the same) and as a result it’s lower part is cropped and there is no dropdown menu at all. Unfortunately - it makes it useless on iPhone.
I tried to play with some %height and %width settings in style.js and xiaomi-vacuum-map-card.js files - but with no success. There is to many dependencies inside. When the map was displayed correctly, zones were moved and also pointer (in Go to and Zoned cleaning mode) moved away from mouse pointer.
It would be good to have some general scalling factor as apparently Safari has some problems with proper rendering.
I would appreciate if you could consider this in one of possible future releases.
Thank you in advance!

Hi,@3_14 If i can get mi map periodically,how to update this card?

Hi all. I have Valetudo running and rockrobo paired with hassio. BUT I wanna create some sonsors and fail to get the state.

This are the attributes:

How ould i make template sensor for

valetudo_state: {
  "id": 8,
  "name": "Charging"

here my attempt of getting sensor values. I just struggle with valetudo states…

## Vacuum Cleaner Sensors

  - platform: template    
    sensors:
      xiaomi_status:
        entity_id: vacuum.rockrobo
        value_template: >
            {% if states. vacuum.rockrobo.attributes.status == "Charging" %}
              Charging
            {% elif states. vacuum.rockrobo.attributes.status == "Cleaning" %}
              Cleaning
            {% elif states. vacuum.rockrobo.attributes.status == "Returning home" %}
              Returning Home
            {% elif states. vacuum.rockrobo.attributes.status == "Zoned cleaning" %}
              Zoned Cleaning
            {% elif states. vacuum.rockrobo.attributes.status == "Manual mode" %}
              Manual Mode
            {% elif states. vacuum.rockrobo.attributes.status == "Going to target" %}
              Going to Target
            {% elif states. vacuum.rockrobo.attributes.status == "Charger disconnected" %}
              Charger Disconnected
            {% elif states. vacuum.rockrobo.attributes.status == "Error" %}
              Error
            {% elif states. vacuum.rockrobo.attributes.status == "Unknown" %}
              Unknown
            {% elif states. vacuum.rockrobo.attributes.status == "Idle" %}
              Idle
            {% else %}
              {{ states. vacuum.rockrobo.attributes.status }}
            {%- endif %}
        friendly_name: 'Status Vacuum Cleaner'
        icon_template: mdi:altimeter

      xiaomi_battery_level:
        entity_id: vacuum.rockrobo
        friendly_name: 'Battery Status'
        value_template: '{{ states.vacuum.rockrobo.attributes.battery_level | float | int }}'
        unit_of_measurement: '%'
        device_class: battery

      xiaomi_fan_speed:
        entity_id: vacuum.rockrobo
        friendly_name: 'Fan Speed'
        value_template: '{{ states.vacuum.rockrobo.attributes.fan_speed }}'

      xiaomi_cleaning_time:
        entity_id: vacuum.rockrobo
        friendly_name: 'Cleaning Time'
        value_template: '{{ states.vacuum.rockrobo.attributes.cleanTime }}'


      xiaomi_cleaning_count:
        entity_id: vacuum.rockrobo
        friendly_name: 'Cleaning Count'
        value_template: '{{ states.vacuum.rockrobo.attributes.cleanCount }}'

      xiaomi_total_cleaned_area:
        entity_id: vacuum.rockrobo
        friendly_name: 'Total cleaned area'
        value_template: '{{ states.vacuum.rockrobo.attributes.cleanArea }}'

      xiaomi_total_cleaning_time:
        entity_id: vacuum.rockrobo
        friendly_name: 'Total cleaning time'
        value_template: '{{ states.vacuum.rockrobo.attributes.cleanTime }}'

      xiaomi_main_brush_left:
        entity_id: vacuum.rockrobo
        friendly_name: 'Main brush left'
        value_template: '{{ states.vacuum.rockrobo.attributes.mainBrush }}'

      xiaomi_side_brush_left:
        entity_id: vacuum.rockrobo
        friendly_name: 'Side brush left'
        value_template: '{{ states.vacuum.rockrobo.attributes.sideBrush }}'

      xiaomi_sensor_dirty_left:
        entity_id: vacuum.rockrobo
        friendly_name: 'Sensor dirty left'
        value_template: '{{ states.vacuum.rockrobo.attributes.sensor }}'

      xiaomi_filter_left:
        entity_id: vacuum.rockrobo
        friendly_name: 'Filter left'
        value_template: '{{ states.vacuum.rockrobo.attributes.filter }}'

Hey,

Excellent work, at the moment just tried it and seems i have some tweaks to get correct alignment with image/zones. Maybe base and reference are not completly correct on my setup :slight_smile:
I also tried to cast a view with this card and it seems not working. Anyone managed to cast this card ?

It is a second from my cards that have casting issues, I definitely have to take a closer look at it. Unfortunately right now I do not have any cast-enabled devices

@tresor you can make your map more rectangular by adding empty spaces to the image, this should help with your issue

@xl2019 right now it is not possible

Haha ok. Would be glad to test if you need ! I’ll check as soon as I have some time if I can get some clues !

First : read FAQ :slight_smile:

If you’re a custom card developer:
the most common mistake is that LitElement is extracted from an element that is not available on the page.

Could be ?

Thank you. I’ll give it a try.
It works!

It’s still possible to select more than 5 zones because zones that you put in the same row in the config is considered as one zone, is this fixeable?

I just made the map more square-like and uploaded that to HA. Then recalibrated the map and it works on iPhone as well.

Tho, for me I see no use for the go-to feature and even the manual zone-drawing. I am only using the preconfigured zones. it would be great if it was possible to set the Zones-view as default in an easier way than editing the code. And I guess the zone-drawing is the reason why you can’t scroll the card while holding the finger on the map. All of this would be great if it was configurable.

@Maximus97 It should be, I will try to fix it

@Dernebo I will try to make it configurable :slight_smile: