Custom vacuum-card for Home Assistant

When ever my vacuum starts cleaning the card disappears for me , has anybody had this issue / rectified it?

1 Like

Hey guys. How do I change the color of the toolbar icons?

image

I’m running into the same problem as @currest2620 and @porop72.

My Roborock is giving me seconds and that’s not very usefull.

I’ve tried the following line in Developer Tools → Template and it works:
{{(states.sensor.robby_rock_filter_left.state | float / 3600) |round|int }}

But within sensors.yaml and my code I got an error trying to restats Home Assistant:

robby rock sensors    
  - platform: template
    sensors:
      vacuum_filter_runder:
      friendly_name: Filter Runder
      value_template: '{{(states.sensor.robby_rock_filter_left.state | float / 3600) |round|int }}'

Any ideas?

I’m trying to figure out how to change the background in that area too. I think it has to do with opacity, but haven’t been able to find it.

Any luck?

firefox_eEWcQGDEtm

I woke up today to this mess. I haven’t changed anything. Does somebody know why this visual bug is happening all of the sudden?

You have upgraded HA Core to core-2022.3.x lately. Check the release notes, particularly the part about UI Upgrades.

The screenshot you have (partly) posted is not about Custom vacuum-card for Home Assistant but it is from the Lovelace Vacuum Map card. You are posting into the wrong thread. The correct thread can be found here.

The issue you are reporting has already been reported here and here.

2 Likes

I have a Roborock S7. all attributes (now sensor.blah_blah show in seconds)

Has someone figured out hot to convert to hours?

in minutes (for vacuum duration):

- platform: template
  sensors:
    YOUR_NAME_FOR_THE_CORRECTED_SENSOR:
      friendly_name: VACCUM_NAME
      unit_of_measurement: "min"
      value_template: "{{(states.sensor.YOUR_VACUUM_SENSOR.state | int / 60) | round }}"

in hours (for sensors):

- platform: template
  sensors:
    YOUR_NAME_FOR_THE_CORRECTED_SENSOR:
      friendly_name: VACUUM_SENSOR_NAME
      unit_of_measurement: "h"
      value_template: "{{(states.sensor.YOUR_VACUUM_SENSOR.state
        | int / 3600) | round }}"
1 Like

And i post this inside a sensors.yaml? Do i need to refer to it from the card

Yep, they go in the your sensors.yaml that it hopefully already included in configuration.yaml via sensor: !include sensors.yaml.

And you have to use these new sensors instead of the old seconds-sensor.

type: custom:vacuum-card
entity: vacuum.YOUR_VACUUM
image: default
compact_view: false
show_toolbar: true
stats:
  default:
    - entity_id: sensor.YOUR_NAME_FOR_THE_CORRECTED_SENSOR_FOR_MAIN
      unit: h
      subtitle: Main
    - entity_id: sensor.YOUR_NAME_FOR_THE_CORRECTED_SENSOR_FOR_SIDE
      unit: h
      subtitle: Side
    - entity_id: sensor.YOUR_NAME_FOR_THE_CORRECTED_SENSOR_FOR_FILTER
      unit: h
      subtitle: Filter
    - entity_id: sensor.YOUR_NAME_FOR_THE_CORRECTED_SENSOR_FOR_DIRT_SENSOR
      unit: h
      subtitle: Sensor

image

1 Like

Thank you so much for your help

image

I figured out the image thing, so that is all set. It took me a while, but I finally figured out why the litter level was not showing for my LitterBot. In my stats section, I only had attribute called out (because I was just modifying the default code) and entity_id in the cleaning section below.

I thought I might have to use both of the names, so I added entity_id in the default section. That made my level show properly. To show how the code was reacting, I wanted to get some screenshots of:

  • attribute only
  • entity_id only
  • attribute & entity_id

When I commented out entity_id, I lost the display. When I restored entity_id, the display came back. When I commented out attribute, the data stayed. So, it looks like only entity_id should be used to display.By themselves, I was not getting any display.

This is what my config code looks like:

type: custom:vacuum-card
entity: vacuum.halpoo_litter_box
image: /local/images/litter.png
stats:
  default:
    - entity_id: sensor.halpoo_waste_drawer
      unit: "%"
      subtitle: Poo Level
  show_toolbar: true
show_status: true
show_name: true
compact_view: false

Love the card! I was wondering if there is a way I could add a binary sensor up at the top left next to the fan and battery? My Deebot X1 Omni has mop pads and a binary sensor shows on or off when they are installed. Id like to be able to show different icons for its state. I added the sensor to the default stats section successfully but its in text and think a nice small icon up top would look better.

Side note the map the camera gives is really bad, anyone have any tricks for making it look better?

Hi,
Thank you for developing this custom card!

I have a Roomba 960, and the amount of attributes I’m getting from the Roomba integration is rather limited. So I’ve kept my card rather simple.

However, I do have one question: the “bin full” sensor is a binary sensor. It shows as “on” or “off”. However, it would make sense if I could change it to “yes/no”. Where can I do that?

type: custom:vacuum-card
entity: vacuum.roomba
compact_view: false
show_name: true
show_toolbar: true
show_status: true
stats:
  cleaning:
    - attribute: cleaning_time
      unit: minutes
      subtitle: Stofzuig tijd
    - attribute: cleaned_area
      unit: m²
      subtitle: Oppervlakte
    - attribute: bin_full
      entity_id: binary_sensor.roomba_bin_full
      unit: null
      subtitle: Vuilbak vol?
  default:
    - attribute: bin_full
      entity_id: binary_sensor.roomba_bin_full
      unit: null
      subtitle: Vuilbak vol?

Shortcuts scripts dont launch, instead I get 'failed to call service script/clea…connection lost " the script work fine when I call them under scripts. card config below, thank you!

type: custom:vacuum-card
entity: vacuum.bob
actions:
start:
service: dreame_vacuum.vacuum_clean_segment
service_data:
entity_id: vacuum.bob
segments:

  • 9
  • 7
  • 11
  • 10
  • 4
  • 6
    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:
  • entity_id: sensor.bob_main_brush_left
    value_template: ‘{{ (value float(0) / 3600) round(1) }}’
    subtitle: Main brush
    unit: hours
  • attribute: cleaning_time
    unit: minutes
    subtitle: Cleaning time
    shortcuts:
  • name: Clean Living Room
    service: script.clean_living_room
    icon: mdi:sofa
  • name: Clean Master bedroom
    service: script.clean_master
    icon: mdi:bed-empty
  • name: Clean Kitchen
    service: script.clean_kitchen
    icon: mdi:silverware-fork-knife
  • name: Clean Bathroom
    service: script.clean_bathroom
    icon: mdi:bathtub
  • name: Auto Empty
    service: script.auto_empty
    icon: mdi:trash-can

To rise the chances to get help you should format the code you have pasted correctly:

sensor:
  - platform: template
    sensors:
      roomba_bin_full:
        friendly_name: "Roomba Dust Bin Status"
        value_template: >
          {% if is_state('binary_sensor.roomba_bin_full', 'on') %}
          Yes
          {% else %}
          No
          {% endif %}

In your configuration.yaml

made this roomba 960 icon if anyone wants it:

roomba960

How did you get the Deebot X1 Omni added to HA?

I just started noticing this behavior on last weeks update. Did you ever get fix?

I just got this card the other day, I’m experiencing the same thing. Completely vanishes in HA no matter what device I’m using!