Picture Elements vacuum icon color and call service action

Hi,

  1. On my dashboard I am trying to change the color of my vacuum icon based on the status. I can adjust the color for status “docked”
- type: conditional
            conditions:
              - entity: vacuum.roborock_s6_maxv
                state: docked
            elements:
              - type: state-icon
                icon: mdi:robot-vacuum-variant
                entity: vacuum.roborock_s6_maxv
                action: none
                tap_action:
                  action: navigate
                  navigation_path: /dashboard-ipad/staubsauger
                hold_action: none
                style:
                  top: 10%
                  left: 22%
                  transform: translate(-50%, -50%) scale(2.5, 2.5)
                  '--paper-item-icon-color': black
                  opacity: 0.8
                  filter: drop-shadow(5px 5px 5px rgba(0,0,0,0.3))

But when I use the same code for example for the status “cleaning”, it does not work.
None of the following codes works for the color.

- type: conditional
            conditions:
              - entity: vacuum.roborock_s6_maxv
                state: cleaning
            elements:
              - type: state-icon
                icon: mdi:robot-vacuum-variant
                entity: vacuum.roborock_s6_maxv
                action: none
                tap_action:
                  action: navigate
                  navigation_path: /dashboard-ipad/staubsauger
                hold_action: none
                style:
                  top: 10%
                  left: 22%
                  transform: translate(-50%, -50%) scale(2.5, 2.5)
                  '--paper-item-icon-color': red
                  '--paper-item-vacuum-color': red
                  '--state-icon-on-color': red
                  '--state-icon-off-color': red
                  '--state-vacuum-on-color': red
                  '--state-vacuum-off-color': red
                  color: red
                  opacity: 0.8
                  filter: drop-shadow(5px 5px 5px rgba(0,0,0,0.3))

Any suggestions on how to change the color?

  1. Also I want to pause the vacuum when clicking on an icon. I don’t get this to work either. Whats wrong here?
- type: state-icon
            entity: vacuum.roborock_s6_maxv
            icon: mdi:pause
            tap_action: call-service
            service: vacuum.pause
            hold_action: none
            style:
              top: 76%
              left: 68%
              transform: translate(-50%, -50%) scale(3, 3)
              '--paper-item-icon-color': black

Thanks.

Try like this:

- type: state-icon
            entity: vacuum.roborock_s6_maxv
            icon: mdi:pause
            tap_action: call-service
            service: vacuum.pause
            service_data:
              entity_id: vacuum.roborock_s6_maxv
            hold_action: none
            style:
              top: 76%
              left: 68%
              transform: translate(-50%, -50%) scale(3, 3)
              '--paper-item-icon-color': black

Thanks, but it does not work either. No reaction when clicking on the item.

sorry my mistake try like this:

tap_action:
      action: call-service
      service: vacuum.pause
      service_data:
        entity_id: vacuum.roborock_s6_maxv

Yeah, that works. Thanks :pray::blush:.

Can you also tell me how I can change the color when the vacuum is active? At the moment the icon is black (like shown in the code) when the vacuum is in the dock but as soon as it starts the icon goes turquois. I always want it to be black.

To disable icon color change when entity is active.
Add:

state_color: false

Picture elements card

1 Like