Custom vacuum-card for Home Assistant

Change “actions” to “shortcuts” in the config. That is a change introduced in v2.0 according to changelog.

Thank you @flux-i I saw it, but even with that I don’t gt the icons show up :sweat_smile:

Hmm, ok that’s strange since it worked before… :thinking:
Assuming that your YAML is syntactically correct, I can only think of some semantic error. Here is my config, maybe you can spot a difference… ?

type: custom:vacuum-card
entity: vacuum.roborock_s6
stats:
  default:
    - entity_id: sensor.main_brush
      unit: min
      subtitle: Main brush
    - entity_id: sensor.right_brush
      unit: min
      subtitle: Right brush
    - entity_id: sensor.main_filter
      unit: min
      subtitle: Main Filter
    - entity_id: sensor.sensor_cleaning
      unit: min
      subtitle: Sensor Cleaning
  cleaning:
    - attribute: cleaned_area
      unit: m2
      subtitle: Cleaning area
    - attribute: cleaning_time
      unit: minutes
      subtitle: Cleaning time
shortcuts:
  - name: Clean Living Room
    service: script.vacuum_clean_segments_message
    service_data:
      segments: '["{{state_attr("input_boolean.vacuum_livingroom", "room_id")}}"]'
    icon: mdi:sofa
  - name: Clean Hallway
    service: script.vacuum_clean_segments_message
    service_data:
      segments: '["{{state_attr("input_boolean.vacuum_hallway", "room_id")}}"]'
    icon: mdi:foot-print
  - name: Clean Bedroom
    service: script.vacuum_clean_segments_message
    service_data:
      segments: '["{{state_attr("input_boolean.vacuum_bedroom", "room_id")}}"]'
    icon: mdi:bed-empty
  - name: Clean Study
    service: script.vacuum_clean_segments_message
    service_data:
      segments: '["{{state_attr("input_boolean.vacuum_study", "room_id")}}"]'
    icon: mdi:laptop
  - name: Clean Kitchen
    service: script.vacuum_clean_segments_message
    service_data:
      segments: '["{{state_attr("input_boolean.vacuum_kitchen", "room_id")}}"]'
    icon: mdi:silverware-fork-knife
  - name: Clean Bathroom
    service: script.vacuum_clean_segments_message
    service_data:
      segments: '["{{state_attr("input_boolean.vacuum_bathroom", "room_id")}}"]'
    icon: mdi:shower
  - name: Clean WC
    service: script.vacuum_clean_segments_message
    service_data:
      segments: '["{{state_attr("input_boolean.vacuum_wc", "room_id")}}"]'
    icon: mdi:human-male-female
compact_view: false
show_status: true
show_name: true
show_toolbar: true

1 Like

Hello, thanks for this useful addon. I am using it with Roomba J7+ the play and dock buttons work fine, but the sensors are not updating (cleaning area, time, brushes, etc)

Great addon.
I have the Roomba J7+ and the Braava M6.
For these models I made two images. And would like to share it.

roomba_j7plus
braava_m6

3 Likes

can you share the scripts?

Send Home…

alias: Wall-e Home
sequence:
  - service: vacuum.stop
    target:
      device_id: vacuum.wall_e
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - data: {}
    entity_id: vacuum.wall_e
    service: vacuum.return_to_base
mode: single
icon: mdi:home-import-outline

Locate Vacuum…

alias: Wall-e Locate
sequence:
  - data: {}
    entity_id: vacuum.wall_e
    service: vacuum.locate
mode: single
icon: mdi:map-marker-question-outline

Delayed Start…

alias: Wall-e Delayed Start
sequence:
  - data:
      entity_id: media_player.wallpanel
      message: Wally will start cleaning in 5 Minutes
    service: tts.google_say
  - delay: '00:05:00'
  - data: {}
    entity_id: vacuum.wall_e
    service: vacuum.turn_on
mode: single
icon: mdi:clock-start

Immediate Start…

alias: Wall-e Start Cleaning
sequence:
  - service: vacuum.start
    target:
      device_id: vacuum.wall_e
mode: single
icon: mdi:play

Immediate Stop…

alias: Wall-e Stop
sequence:
  - data: {}
    entity_id: vacuum.wall_e
    service: vacuum.stop
mode: single
icon: mdi:stop

Hope that helps

This is also my current Lovelace
image

  - type: custom:layout-card
    cards:
      - type: picture-elements
        image: /local/pictures/irobot.jpg
        elements:
          - type: state-label
            entity: var.vacuum_name
            style:
              top: 15%
              left: 49%
              font-size: 1.3vw
              color: white
              font-weight: bold
          - type: state-icon
            entity: vacuum.wall_e
            style:
              transform: translate(0,0)
              top: 20%
              left: 5%
              '--paper-item-icon-color': white
          - type: state-label
            entity: vacuum.wall_e
            style:
              transform: translate(0,0)
              top: 20%
              left: 12%
              font-size: 1.0vw
              color: white
          - type: state-icon
            entity: vacuum.wall_e
            style:
              transform: translate(0,0)
              top: 35%
              left: 5%
              '--paper-item-icon-color': white
          - type: state-label
            entity: sensor.vacuum_status
            style:
              transform: translate(0,0)
              top: 35%
              left: 12%
              font-size: 1.0vw
              color: white
          - type: state-icon
            entity: sensor.wall_e_battery_level
            style:
              transform: translate(0,0)
              top: 50%
              left: 5%
              '--paper-item-icon-color': white
          - type: state-label
            entity: sensor.wall_e_battery_level
            style:
              transform: translate(0,0)
              top: 50%
              left: 12%
              font-size: 1.0vw
              color: white
          - type: state-label
            entity: sensor.wall_e_run_time
            attribute: value
            prefix: 'Run Time: '
            style:
              position: absolute
              transform: translate(0,0)
              top: 20%
              right: 5%
              font-size: 1.0vw
              color: white
          - type: state-label
            entity: sensor.vacuum_bin_present
            prefix: 'Bin Present: '
            style:
              position: absolute
              transform: translate(0,0)
              top: 35%
              right: 5%
              font-size: 1.0vw
              color: white
          - type: state-label
            entity: sensor.vacuum_bin_full
            prefix: 'Bin Full: '
            style:
              position: absolute
              transform: translate(0,0)
              top: 50%
              right: 5%
              font-size: 1.0vw
              color: white
          - type: state-icon
            entity: script.1583976617287
            title: Start
            tap_action:
              action: call-service
              service: script.1583976617287
            style:
              top: 80%
              left: 10%
              '--paper-item-icon-color': white
          - type: state-icon
            entity: script.1583704406106
            title: Stop
            tap_action:
              action: call-service
              service: script.1583704406106
            style:
              top: 80%
              left: 30%
              '--paper-item-icon-color': white
          - type: state-icon
            entity: script.1583675238858
            title: Locate
            tap_action:
              action: call-service
              service: script.1583675238858
            style:
              top: 80%
              left: 50%
              '--paper-item-icon-color': white
          - type: state-icon
            entity: script.1583686496925
            title: Send Home
            tap_action:
              action: call-service
              service: script.1583686496925
            style:
              top: 80%
              left: 70%
              '--paper-item-icon-color': white
          - type: state-icon
            entity: script.1583675350603
            title: Delayed Start
            tap_action:
              action: call-service
              service: script.1583675350603
            style:
              top: 80%
              left: 90%
              '--paper-item-icon-color': white

Hope someone finds it usefull!

THKS pcwii

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