Custom vacuum-card for Home Assistant

I would like to know too as mine is the same and I don’t see the camera entity for my vacuum for the map.

How change the language? It says in doc that is supported but not mention how to switch…

You may have already solved this, but in case you haven’t or anyone else is wondering the same, yes it is possible to use sensors as the attributes! Here is how I use them in my card:

type: 'custom:vacuum-card'
entity: vacuum.r2dee2
image: default
compact_view: false
show_name: true
show_toolbar: true
show_status: true
stats:
  default:
    - entity_id: sensor.r2dee2_filter
      unit: hours
      subtitle: Filter
    - entity_id: sensor.r2dee2_main_brush
      unit: hours
      subtitle: Main Brush
    - entity_id: sensor.r2dee2_side_brush
      unit: hours
      subtitle: Side Brush

My sensors are created using templating because the attributes of my vacuum entity report the hours of life remaining * 100 for whatever reason so I had to convert it. There might be a simpler way to do this that I’m unaware of but this works nonetheless. Here is how my sensors are set up:

sensor:
  - platform: template
    sensors:
      r2dee2_filter:
        friendly_name: "R2DEE2 Filter Life"
        unit_of_measurement: "hours"
        value_template: "{{ state_attr('vacuum.r2dee2', 'component_filter') / 100}}"
      r2dee2_main_brush:
        friendly_name: "R2DEE2 Main Brush Life"
        unit_of_measurement: "hours"
        value_template: "{{ state_attr('vacuum.r2dee2', 'component_main_brush') / 100}}"
      r2dee2_side_brush:
        friendly_name: "R2DEE2 Side Brush Life"
        unit_of_measurement: "hours"
        value_template: "{{ state_attr('vacuum.r2dee2', 'component_side_brush') / 100}}"

Hope this helps!

2 Likes

Hi!

Thank you so much @atvking this works great for me.

greez

1 Like

Hey,

I have installed costum vacuum card. On my windows pc I see everything correctly (see pic. 1) with on my ios devices I see the error below !!! (see pic. 2) How do I get this resolved?

Thank you for your response

pic. 1

Hi, can’t see it in HACS, how to install this custom card? Tried to install manually but that did not work either. Please suggest.

Did you search for

Vacuum Card

In HACS?

Yes, that is under different name there. I have managed to install it, but I face with different issue now. It shows OK on PC but on Android and on Raspbian it shows red with error “Custom component does not exist: vacuum-card” Same as Mabaels post above.

I would like to ask if there’s any way to hide the “location” button that find vaccum? I Have many rooms and in card I don’t see all of they icons

I love this card, I use it for my Litter Robot and this is how it looks:

LL Litter Robot

Love IT!

The only thing is the status is not displayed, but the sensor is there on the device:

In the screenshot above the status I want to display is “Echo Beach Waste Drawer”, but in the first screenshot you will see in the top right hand corner all I have is a %.

Any ideas?

I like this card a lot and I altered it to my needs but I do have a problem and I can’t figure it out - if someone can help me Xiaomi Vacuum - error on vacuum_clean_segment: expected int for dictionary value @ data['segments']
image

1 Like

Probably missing something obvious, but how do I get the stats to populate at the bottom of the card?

Mine shows like this without the data…

Card code:

type: custom:vacuum-card
entity: vacuum.roborock_vacuum_s5e
image: default
stats:
  default:
    - attribute: filter_left
      unit: hours
      subtitle: Filter
    - attribute: side_brush_left
      unit: hours
      subtitle: Side brush
    - attribute: main_brush_left
      unit: hours
      subtitle: Main brush
    - attribute: sensor_dirty_left
      unit: hours
      subtitle: Sensors
  cleaning:
    - attribute: cleaned_area
      unit: m2
      subtitle: Cleaning area
    - attribute: cleaning_time
      unit: minutes
      subtitle: Cleaning time

Had this working before but I can’t quite remember what I had in it.

Have you updated the card to the latest?

Yeah, updated via HACS. I noticed that the attributes seem missing from the vacuum when I look at states in developer tools. I see them in the vacuum map card so its no biggie I guess.

Don’t forget to reactivate some entities for your vacuum (there have been some changes with HA 2021.11.x

If you have the Xiaomi Miio Integration installed:
Settings → Integrations → Xiaomi Miio → Roborock Device → Entities

The attributes are now sensors since 2021.11.x
You have to change your Lovelace config as well after activating the sensors
Something like this

            stats:
              default:
                - entity_id: sensor.xiaomi_vacuum_filter_left
                  unit: Stunden
                  subtitle: Filter
                - entity_id: sensor.xiaomi_vacuum_side_brush_left
                  unit: Stunden
                  subtitle: Seitenbürste
                - entity_id: sensor.xiaomi_vacuum_main_brush_left
                  unit: Stunden
                  subtitle: Hauptbürste
                - entity_id: sensor.xiaomi_vacuum_sensor_dirty_left
                  unit: Stunden
                  subtitle: Sensoren

1 Like

Awesome, thanks for that. Wasn’t sure how to do entity id’s in the setup. Though they seem to be displayed in seconds which I am not sure is very useful.

Hello,
Same problem and can not convert to hour.
Tried the template solution, but something wrong because it doesn’t reach the entity.
Any other solution?

Hi!
Awesome work! I do not know why, but from a week ago or so I can not get the action button icons showed up. I have already checked I am in the latest release and I am using “Hass” icons instead of “mdi”.

Do you have some idea to fix it?

i see it supports 360 s7 pro ? How would this be supported, i know of no way on how to integrate these other then a alexa skill/routine.