gliena
(guillaume)
March 10, 2022, 3:43pm
1107
Hi,
this card is awesome and is very usefull, great work.
I can almost ditch the app the only thing missing:
Resetting the filters/brushes when they have been replaced by long pressing the info tab for example
When I haven’t open the lid for a while and that i have to empty the bin. I could have a binary sensor set to 1. I could than automate a notificaion
Are these functions something that could be added?
3_14
(Piotr Machowski)
March 10, 2022, 4:01pm
1108
You can do as many as you want to
1 Like
rznt
(RSZ)
March 10, 2022, 8:59pm
1110
Thanks a lot for your fast answer! So, “color_scan” did the job
gliena
(guillaume)
March 10, 2022, 11:32pm
1111
Thanx I was able to figure this out, just sharing in case this may help someone:
hold_action:
action: call-service
service: vacuum.send_command
service_data:
entity_id: vacuum.roborock_s6_maxv
command: reset_consumable
params: filter_work_time
It most probably should be part of the integration, I am unable to figure out if there is something showing if the bin is full, will continue searching.
1 Like
krovachek
(Krisztian Borsi)
March 11, 2022, 6:55am
1112
How can I eliminate this kind of “overflowing”?
krovachek
(Krisztian Borsi)
March 11, 2022, 11:10am
1114
So it is designed by HA latest versions
1 Like
gliena
(guillaume)
March 11, 2022, 12:26pm
1115
I recreated the look of the card which i like but with the hold-action to reset the filters. Here is the complete code I wrote. (might help sommeone).
Is there a way to have a dynamic icon for the battery like it’s the case in the default setup?
tiles:
- label: Status
entity: vacuum.roborock_s6_maxv
attribute: status
icon: mdi:robot-vacuum
- label: Battery
entity: vacuum.roborock_s6_maxv
attribute: battery_level
unit: '%'
icon: mdi:battery
- label: Fan speed
entity: vacuum.roborock_s6_maxv
attribute: fan_speed
icon: mdi:fan
- label: Sensor left
entity: sensor.roborock_s6_maxv_sensor_dirty_left
multiplier: 0.0002777777777777778
unit: h
icon: mdi:eye-outline
precision: 1
hold_action:
action: call-service
service: vacuum.send_command
service_data:
entity_id: vacuum.roborock_s6_maxv
command: reset_consumable
params: sensor_dirty_time
- label: Filter left
entity: sensor.roborock_s6_maxv_filter_left
multiplier: 0.0002777777777777778
unit: h
icon: mdi:air-filter
precision: 1
hold_action:
action: call-service
service: vacuum.send_command
service_data:
entity_id: vacuum.roborock_s6_maxv
command: reset_consumable
params: filter_work_time
- label: Main brush left
entity: sensor.roborock_s6_maxv_main_brush_left
multiplier: 0.0002777777777777778
unit: h
icon: mdi:brush
precision: 1
hold_action:
action: call-service
service: vacuum.send_command
service_data:
entity_id: vacuum.roborock_s6_maxv
command: reset_consumable
params: main_brush_work_time
- label: Side brush left
entity: sensor.roborock_s6_maxv_side_brush_left
multiplier: 0.0002777777777777778
unit: h
icon: mdi:brush
precision: 1
hold_action:
action: call-service
service: vacuum.send_command
service_data:
entity_id: vacuum.roborock_s6_maxv
command: reset_consumable
params: side_brush_work_time
2 Likes
3_14
(Piotr Machowski)
March 11, 2022, 12:36pm
1116
Nicely done You can also double-click “play” button to retrieve autogenerated config, it will be printed in browser’s console (it is almost exactly the same as your, the only thing that is missing are translations, but they are not required for English )
Currently it’s not possible to have a dynamic icon, but I plan to add this feature
2 Likes
tozim
(Tobias)
March 15, 2022, 12:09pm
1118
What’s the best way to have this card display the map of a valetudo robot?
Still ICantBelieveItsNotValetudo?
3_14
(Piotr Machowski)
March 15, 2022, 12:47pm
1119
Yup, I don’t really want to parse raw map data…
3_14
(Piotr Machowski)
March 15, 2022, 1:04pm
1120
You can check out this issue:
opened 12:13PM - 30 Jan 22 UTC
enhancement
### Description
I have recently flashed my vacuum with Valetudo **RE** and woul… d love a seamless integration in HA with your amazing card.
Therefore two features would be neat
- Have a `platform_template` for Valetudo **RE**, which directly sends MQTT commands to the robot (or a different topic and add an automation which parses the data to the format required by Valetudo re.
- (future?) Enable automatic calibration of the map: I found a way to generate calibration points from Valetudo RE's [mapper](https://github.com/rand256/valetudo-mapper). Moments ago I asked for a feature request [over there to auto-calibrate and serve the calibration points](https://github.com/rand256/valetudo/issues/481).
### Solution
**platform_template**
This is how far I got:
I have cloned your repo and my work-in-progress `platform_template` currently looks like this(excerpt):
```
{
"map_modes": {
"defaultTemplates": ["vacuum_clean_zone", "vacuum_goto"],
"templates": {
"vacuum_clean_zone_predefined": {
"name": "map_mode.vacuum_clean_zone_predefined",
"icon": "mdi:floor-plan",
"selection_type": "PREDEFINED_RECTANGLE",
"max_selections": 5,
"coordinates_rounding": true,
"repeats_type": "INTERNAL",
"max_repeats": 3,
"service_call_schema": {
"service": "mqtt.publish",
"service_data": {
"topic": "vacuum/bb8/custom_command",
"payload": "{ \"command\": \"zoned_cleanup\", \"zone_ids\": [{ \"id\": [[selection_id]], \"repeats\": [[repeats]] }], \"afterCleaning\": \"Base\" }"
}
}
}
}
},
"tiles": {
"from_attributes": [
{
"attribute": "mainBrush",
"label": "tile.main_brush_left.label",
"icon": "mdi:fan-speed-1",
"unit": "unit.hour_shortcut"
},
{
"attribute": "sideBrush",
"label": "tile.side_brush_left.label",
"icon": "mdi:fan-speed-2",
"unit": "unit.hour_shortcut"
},
{
"attribute": "filter",
"label": "tile.filter_left.label",
"icon": "mdi:air-filter",
"unit": "unit.hour_shortcut"
}
],
"from_sensors": []
}
}
```
And the card:
```
type: custom:xiaomi-vacuum-map-card
title: Xiaomi Card TESTING
preset_name: Live map
entity: vacuum.rockrobo
map_source:
camera: camera.rockrobo_map_data
map_locked: true
vacuum_platform: mqtt_generic
debug: true
calibration_source:
calibration_points:
- vacuum:
x: 23800
'y': 22600
map:
x: 21
'y': 21
- vacuum:
x: 30250
'y': 29850
map:
x: 537
'y': 601
- vacuum:
x: 36700
'y': 22600
map:
x: 1053
'y': 21
map_modes:
- template: vacuum_clean_zone
- template: vacuum_clean_zone_predefined
predefined_selections:
- zones:
- - 28889
- 23472
- 30306
- 24685
label:
text: Bad
x: 29500
'y': 24000
offset_y: 35
icon:
name: mdi:shower
x: 29500
'y': 24000
- zones:
- - 28475
- 24604
- 30665
- 25960
- - 28676
- 25871
- 30219
- 29701
label:
text: Flur
x: 29500
'y': 27200
offset_y: 35
icon:
name: mdi:pot-mix
x: 29500
'y': 27200
```
The sensor integration works well.
Unfortunately the parsing of parameters [[selection_id]] and [[repeats]] is not yet resolved correctly, neither works `|[[jsonize]]` as suggested in your [readme](- `|[[jsonize]]`: if value ends with this modifier it will be decoded as a JSON). Is this limited to `service_data` or is also applicable to `payload`? Maybe you could point me in the right direction, how to accomplish this.
**calibration points**
Unfortunately, I do not really know how to achieve auto-calibration. I believe parsing them initialized from the robot itself should be the way to go. But how to make them accessible to your card?
### Alternatives
_No response_
### Context
The [Valetudo RE MQTT api](https://github.com/rand256/valetudo/wiki/MQTT-API#Topic_valetudorockrobocustom_command) for the "clean predefined zones" should go to
topic
```
valetudo/rockrobo/custom_command
```
and look like this:
```
{
"command": "zoned_cleanup",
"zone_ids": [
"Foo",
{
"id": "Bar",
"repeats": 2
}
],
"afterCleaning": "Stop"
}
```
tozim
(Tobias)
March 15, 2022, 9:57pm
1121
Is this specifically for Valetudo RE or also the original Valetudo?
And doesn’t that also rely on valetudo-mapper (which is a fork of ICantBelieveItsNotValetudo)?
3_14
(Piotr Machowski)
March 16, 2022, 9:44am
1122
I haven’t tried it with original Valetudo, so you have to check it out by yourself. Yes, it relies on valetudo-mapper, my suggestion was to check out controls section
Elod044
(Elod Tobak)
March 24, 2022, 6:36pm
1124
Hey guys! I am having a problem with this card. I am using a Xiaomi Roborock S5 Max vacuum with xiaomi-miot-auto integration on home assistant 2022.3.5 running on a raspberry pi 4 4/32gb. I generated my config using the generator on the github page. The problem is that the card is basically useless because the buttons are unresponsive. Only the map controls work. Here is the card’s config: type: custom:xiaomi-vacuum-map-cardentity: vacuum.roborock_s5_max_a_szolga_rob - Pastebin.com I really like the look of the card and want to use it and definitely will buy you some coffee when this error is resolved. Thank you for your time!
Tamsy
(Tamsy)
March 25, 2022, 12:56am
1125
Welcome to the forum, Elod
type: custom:xiaomi-vacuum-map-card
entity: vacuum.roborock_s5_max_a_szolga_robot_cleaner
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
map_modes:
- template: vacuum_goto
- template: vacuum_clean_zone
- template: vacuum_clean_segment
predefined_selections:
- id: 20
label:
text: Előszoba
x: 24925
'y': 22825
offset_y: 35
icon:
name: mdi:broom
x: 24925
'y': 22825
- id: 24
label:
text: Imola
x: 21825
'y': 22025
offset_y: 35
icon:
name: mdi:broom
x: 21825
'y': 22025
- id: 18
label:
text: Előd
x: 28350
'y': 21350
offset_y: 35
icon:
name: mdi:broom
x: 28350
'y': 21350
- id: 21
label:
text: Konyha
x: 28325
'y': 24500
offset_y: 35
icon:
name: mdi:broom
x: 28325
'y': 24500
- id: 25
label:
text: Nappali
x: 28525
'y': 26575
offset_y: 35
icon:
name: mdi:broom
x: 28525
'y': 26575
- id: 16
label:
text: Anya és Apa
x: 21675
'y': 26950
offset_y: 35
icon:
name: mdi:broom
x: 21675
'y': 26950
- id: 17
label:
text: Fürdőszoba
x: 24975
'y': 27300
offset_y: 35
icon:
name: mdi:broom
x: 24975
'y': 27300
- id: 19
label:
text: Kamra
x: 28000
'y': 28550
offset_y: 35
icon:
name: mdi:broom
x: 28000
'y': 28550
- id: 22
label:
text: Budi
x: 30475
'y': 28775
offset_y: 35
icon:
name: mdi:broom
x: 30475
'y': 28775
If using id’s where did you put the Outline data to?
Compare your config closely with the demo config . Note in particular lines 33 to 67.
1 Like
3_14
(Piotr Machowski)
March 25, 2022, 1:07am
1126
@Elod044 , the problem is that xiaomi-miot-auto integration is not supported out of the box, because it uses different service calls for different models.
To make it work you have 2 solutions:
Switch to built-in miio integration (it supports your model)
Configure card manually to make it work with xiaomi-miot-auto (guide: issue #251 )
@Tamsy template vacuum_clean_segment
uses outlines just for rendering, cleaning is done by id, so it’s perfectly fine to skip outline
in config
2 Likes