I have changed the card since y post it but I can share my config now. Now I use the @3_14 custom component that create a live map camera, great!!.
The card is Vacuum Card and you can find it in hacs:
This is the card now:
Lovelace code is:
cards:
- actions:
- icon: 'mdi:play-circle'
name: Comenzar
service: python_script.enviar_aspiradora
service_data:
room: limpiar
- icon: 'mdi:cancel'
name: Cancelar
service: python_script.enviar_aspiradora
service_data:
room: cancelar
- icon: 'mdi:tools'
name: Mantenimiento
service: script.turn_on
service_data:
entity_id: script.roborock_punto_mantenimiento
entity: vacuum.roborock_s5_max
map: camera.xiaomi_cloud_map_extractor
stats:
cleaning:
- attribute: cleaned_area
subtitle: Cleaning area
unit: m2
- attribute: cleaning_time
subtitle: Cleaning time
unit: minutes
default:
- attribute: filter_left
subtitle: Filtro
unit: horas
- attribute: side_brush_left
subtitle: C. Lateral
unit: horas
- attribute: main_brush_left
subtitle: C. Central
unit: horas
- attribute: sensor_dirty_left
subtitle: Sensores
unit: horas
type: 'custom:vacuum-card'
- type: horizontal-stack
cards:
- type: 'custom:button-card'
icon: 'mdi:television'
name: SALON
styles:
card:
- height: 45px
- font-size: 10px
- margin: 5px
tap_action:
action: call-service
service: python_script.enviar_aspiradora
service_data:
room: 18
- type: 'custom:button-card'
icon: 'mdi:fridge'
name: COCINA
styles:
card:
- height: 45px
- font-size: 10px
- margin: 5px
tap_action:
action: call-service
service: python_script.enviar_aspiradora
service_data:
room: 20
- type: 'custom:button-card'
icon: 'mdi:door'
name: RECIBIDOR
styles:
card:
- height: 45px
- font-size: 10px
- margin: 5px
tap_action:
action: call-service
service: python_script.enviar_aspiradora
service_data:
room: 16
- type: 'custom:button-card'
icon: 'mdi:human-male-female'
name: BAÑO
styles:
card:
- height: 45px
- font-size: 10px
- margin: 5px
tap_action:
action: call-service
service: python_script.enviar_aspiradora
service_data:
room: 19
- type: 'custom:button-card'
icon: 'mdi:washing-machine'
name: AMARILLA
styles:
card:
- height: 45px
- font-size: 10px
- margin: 5px
tap_action:
action: call-service
service: python_script.enviar_aspiradora
service_data:
room: 17
- entities:
- type: divider
- entity: input_text.rooms_limpiar
name: Habitaciones
- automation.limpieza_automatica
- cover.puerta_robocochera
type: entities
type: 'custom:vertical-stack-in-card'
The last 2 entities in card “Limpieza Automática” and “Puerta Robocochera” only are a automation based on alarm system to clean each day when all people leaves home and an esphome controlled garage door for the vacuum cleaner (hidden under the kitchen cabinets). You can delete it.
The buttons, call a python script that I made, this python script concatenate rooms ids, (don’t be cruel, my python is very basic).
This is the enviar_aspiradora.py python_script:
room = data.get('room');
entity = 'vacuum.roborock_s5_max';
input_text = hass.states.get('input_text.rooms_limpiar').state;
if room == 'limpiar':
input_text_lista = set(input_text.split(','));
input_text_lista_int = [int(i) for i in input_text_lista];
service_data = {'entity_id': entity, 'command': 'app_segment_clean', 'params': input_text_lista_int}
hass.services.call('vacuum', 'send_command', service_data, False)
service_data = {'entity_id': 'input_text.rooms_limpiar', 'value': ''}
hass.services.call('input_text', 'set_value', service_data, False)
elif room == 'cancelar':
service_data = {'entity_id': 'input_text.rooms_limpiar', 'value': ''}
hass.services.call('input_text', 'set_value', service_data, False)
else:
if input_text == '':
service_data = {'entity_id': 'input_text.rooms_limpiar', 'value': room}
hass.services.call('input_text', 'set_value', service_data, False)
else:
input_text = input_text + ',{}'.format(room)
service_data = {'entity_id': 'input_text.rooms_limpiar', 'value': input_text}
hass.services.call('input_text', 'set_value', service_data, False)
I hope it is useful