kosmaluk
(Kosmaluk)
October 12, 2024, 3:39pm
1906
ok, opanowałem ten skrypt vacuum_follow_path. Problemem u mnie jest że usługa vacuum_clean_spot którą wywołuję w skrypcie nie kończy się tj, odkurzacz utrzymuje cały czas stan cleaning wiec musiałem wymusić zatrzymacie i użyć delay na czas sprzątania. Dodatkowo jak wskazałem więcej punktów to odkurzacz wracała do bazy umyć mopy i zaburzał cała pracę wiec dodałem ustawienie większej powierzchni przed rozpoczęciem pracy. Teraz działa
mode: single
alias: Vacuum follow path
variables:
path: "{{ path }}"
entity_id: "{{ entity_id }}"
repeats: "{{ repeats | int }}"
count: "{{ path | length }}"
cleaning_time_per_point: "00:02:45"
mopping_delay: "00:02:10"
sequence:
- choose:
- conditions:
- condition: template
value_template: "{{ count == 1 }}"
sequence:
- action: dreame_vacuum.vacuum_clean_spot
target:
entity_id: "{{ entity_id }}"
data:
points: "{{ path[0] }}"
repeats: "{{ repeats }}"
- delay: >
{% if
states['vacuum.xiaomi_robot_vacuum_x20'].attributes.cleaning_mode
in ['Mopping', 'Sweeping and mopping', 'Mopping after sweeping']
%}
{{ mopping_delay }}
{% else %}
0
{% endif %}
- delay: "{{ cleaning_time_per_point }}"
- target:
entity_id: "{{ entity_id }}"
action: vacuum.pause
- delay: "00:00:05"
- action: vacuum.return_to_base
metadata: {}
data: {}
target:
entity_id: "{{ entity_id }}"
- conditions:
- condition: template
value_template: "{{ count > 1 }}"
sequence:
- target:
entity_id: select.xiaomi_robot_vacuum_x20_mop_clean_frequency
data:
option: 10m²
action: select.select_option
- repeat:
count: "{{ count }}"
sequence:
- variables:
current_point: "{{ path[repeat.index - 1] }}"
- data:
points: "{{ current_point }}"
repeats: "{{ repeats }}"
target:
entity_id: "{{ entity_id }}"
action: dreame_vacuum.vacuum_clean_spot
- delay: >
{% if repeat.index == 1 and
states['vacuum.xiaomi_robot_vacuum_x20'].attributes.cleaning_mode
in ['Mopping', 'Sweeping and mopping', 'Mopping after
sweeping'] %}
{{ mopping_delay }}
{% else %}
0
{% endif %}
- delay: "{{ cleaning_time_per_point }}"
- target:
entity_id: "{{ entity_id }}"
action: vacuum.pause
- delay: "00:00:05"
- target:
entity_id: select.xiaomi_robot_vacuum_x20_mop_clean_frequency
data:
option: 5m²
action: select.select_option
- target:
entity_id: "{{ entity_id }}"
action: vacuum.return_to_base
3_14
(Piotr Machowski)
October 12, 2024, 3:54pm
1907
Możesz użyć tej konfiguracji, integracja dreame wspiera “follow path” bez skryptu
PiotrMachowski:dev
← Tasshack:dev
You can just copy and paste config from your PR. Here is a config that adds all … features from this PR:
```yaml
type: custom:xiaomi-vacuum-map-card
map_source:
camera: camera.dreame
calibration_source:
camera: true
entity: vacuum.dreame
vacuum_platform: Tasshack/dreame-vacuum
map_modes:
- template: vacuum_clean_zone
- template: vacuum_clean_point
- name: Go to point
icon: mdi:map-marker-radius
selection_type: MANUAL_POINT
coordinates_rounding: true
coordinates_to_meters_divider: 1000
repeats_type: NONE
max_repeats: 0
max_selections: 1
service_call_schema:
service: dreame_vacuum.vacuum_goto
service_data:
x: '[[point_x]]'
'y': '[[point_y]]'
entity_id: '[[entity_id]]'
- name: Go To Predefined
icon: mdi:map-marker-multiple
selection_type: PREDEFINED_POINT
coordinates_rounding: true
coordinates_to_meters_divider: 1000
repeats_type: NONE
max_repeats: 0
max_selections: 1
service_call_schema:
service: dreame_vacuum.vacuum_goto
service_data:
x: '[[point_x]]'
'y': '[[point_y]]'
entity_id: '[[entity_id]]'
predefined_selections: []
- name: Follow path
icon: mdi:map-marker-path
selection_type: MANUAL_PATH
coordinates_rounding: true
coordinates_to_meters_divider: 1000
repeats_type: NONE
max_repeats: 0
max_selections: 20
service_call_schema:
service: dreame_vacuum.vacuum_follow_path
service_data:
points: '[[selection]]'
entity_id: '[[entity_id]]'
```
breznkar
(Gregor)
October 13, 2024, 8:26am
1908
Hi Piotr Machowski, wondering if somewhere mentioned following, I saw in LOG today.
kosmaluk
(Kosmaluk)
October 13, 2024, 3:57pm
1909
Thanks Piotr for the configuration sent. As I wrote above, I managed to create my own scripts and they work somehow. However, I have two other problems:
The vacum_clean_spot service does not end and the vacuum cleaner after cleaning the point continues to have the “cleaning” status and idly wanders around the room and does not return to the docking station. I solved it in the script but I think something is wrong.
I use two presets “Parter” and “Piętro” and one map camera.xiaomi_robot_vacuum_x20_map which I switch with the activate_on_switch function. The maps change, but not the coordinates. When I return to the map from the first floor to the ground floor, the map_modes part of the templates (clean_spot, goto) gives me an error: “Coordinate is not inside the map” and I don’t know why. I found a way that when I run Room and Zone cleaning, the coordinates load fine and then everything returns to normal. But after changing the floor, the same thing happened again. You probably know what it’s related to, maybe you can give me a hint.
Thanks very much.
PS. as for the vacuum_follow_path service for dream vacuum , it does not work for my model: “device is not supported”
Regards
3_14
(Piotr Machowski)
October 13, 2024, 4:28pm
1910
Doesn’t dreame_vacuum.vacuum_goto
work better for this case?
kosmaluk:
I found a way that when I run Room and Zone cleaning, the coordinates load fine and then everything returns to normal. But after changing the floor, the same thing happened again. You probably know what it’s related to, maybe you can give me a hint.
Can you show your full config?
kosmaluk
(Kosmaluk)
October 13, 2024, 6:41pm
1911
The vacuum_goto service works well, but it does not clean, the vacuum cleaner only reaches the point and remains in an “idle” state. The Vacuum_clean_spot service determines a square in the center of the point with an area of 1.5 m2 and cleaning, but not finished. I wrote to the author of the integration but he said it was not his fault.
Secondly (the most important thing for me) below is card configuration.
- type: custom:xiaomi-vacuum-map-card
preset_name: Parter
map_source:
camera: camera.xiaomi_robot_vacuum_x20_map
crop:
top: 8
bottom: -30
calibration_source:
camera: true
entity: vacuum.xiaomi_robot_vacuum_x20
vacuum_platform: Tasshack/dreame-vacuum
map_locked: true
two_finger_pan: false
language: pl
append_icons: false
tiles: []
action_handler_id: true
activate_on_switch: true
activate:
service: select.select_option
service_data:
entity_id: select.xiaomi_robot_vacuum_x20_selected_map
option: Parter
card_mod:
style: |
ha-card {
--map-card-zoomer-background: rgba(28, 28, 28, 0.7);
--map-card-room-label-font-size: 12px;
--map-card-room-label-color: white;
--map-card-room-icon-wrapper-size: 35px;
--map-card-predefined-rectangle-label-color: white;
--map-card-predefined-rectangle-icon-wrapper-size: 35px;
--map-card-room-outline-line-color: silver;
--map-card-room-outline-line-width: 0.5px;
--map-card-room-outline-line-segment-gap: 6px;
--map-card-big-radius: 10px;
--map-card-small-radius: 6px;
}
svg text {
font-weight: normal;
font-color: white;
}
map_modes:
- template: vacuum_clean_zone
- name: Sprzątanie punktowe
icon: mdi:map-marker-plus
selection_type: MANUAL_POINT
max_selections: 5
repeats_type: NONE
max_repeats: 5
service_call_schema:
service: script.xiaomi_vacuum_clean_spot
service_data:
selection: '[[selection]]'
repeats: '[[repeats]]'
predefined: 'false'
target:
entity_id: '[[entity_id]]'
- name: Sprzątanie po ścieżce
icon: mdi:map-marker-path
selection_type: MANUAL_PATH
max_selections: 5
repeats_type: NONE
max_repeats: 5
service_call_schema:
service: script.vacuum_follow_path
service_data:
path: '[[selection]]'
repeats: '[[repeats]]'
predefined: 'false'
target:
entity_id: '[[entity_id]]'
- template: vacuum_clean_zone_predefined
name: Strefy lista
predefined_selections:
- zones:
- - 217
- 322
- 1638
- 2157
label:
text: Dywan
x: 878
'y': 1522
offset_y: 35
icon:
name: mdi:rug
x: 878
'y': 1422
- zones:
- - 3240
- -5710
- 4327
- -4096
label:
text: Wycieraczka
x: 3730
'y': -4534
offset_y: 35
icon:
name: mdi:rug
x: 3730
'y': -4834
- name: Idź do punktu
icon: mdi:map-marker-radius
selection_type: MANUAL_POINT
max_selections: 5
repeats_type: NONE
max_repeats: 5
service_call_schema:
service: script.xiaomi_vacuum_goto
service_data:
x: '[[point_x]]'
'y': '[[point_y]]'
predefined: 'false'
target:
entity_id: '[[entity_id]]'
- template: vacuum_clean_segment
predefined_selections:
- id: '1'
icon:
name: mdi:desktop-classic
x: 7350
'y': 200
label:
text: Biuro
x: 7350
'y': 200
offset_y: 35
outline:
- - 5250
- -1600
- - 8900
- -1600
- - 8900
- 1950
- - 5250
- 1950
- id: '2'
icon:
name: mdi:sofa
x: 2500
'y': 2400
label:
text: Salon
x: 2500
'y': 2400
offset_y: 35
outline:
- - -900
- -450
- - 5200
- -450
- - 5200
- 3670
- - 4350
- 4950
- - 2927
- 4950
- - 2262
- 3780
- - -900
- 3780
- id: '3'
icon:
name: mdi:stairs
x: 6050
'y': -3150
label:
text: Hol
x: 6050
'y': -3150
offset_y: 35
outline:
- - 4950
- -3950
- - 7150
- -3950
- - 7150
- -2500
- - 4950
- -2500
- id: '4'
icon:
name: mdi:toilet
x: 6250
'y': -4800
label:
text: Toaleta
x: 6250
'y': -4800
offset_y: 35
outline:
- - 5500
- -5700
- - 7000
- -5700
- - 7000
- -3950
- - 5500
- -3950
- id: '5'
icon:
name: mdi:water-boiler
x: 8050
'y': -3450
label:
text: Kotłownia
x: 8050
'y': -3450
offset_y: 35
outline:
- - 7150
- -5700
- - 9150
- -5700
- - 9150
- -1850
- - 7150
- -1850
- id: '6'
icon:
name: mdi:silverware-fork-knife
x: 600
'y': -2700
label:
text: Kuchnia
x: 600
'y': -2700
offset_y: 35
outline:
- - -1032
- -5000
- - 3100
- -5000
- - 3100
- -450
- - -950
- -450
- - -2350
- -1065
- - -2350
- -2505
- - -1032
- -3250
- id: '7'
icon:
name: mdi:stairs
x: 4000
'y': -3050
label:
text: Przedpokój
x: 4000
'y': -3050
offset_y: 35
outline:
- - 3040
- -5650
- - 5003
- -5650
- - 5003
- -1540
- - 5320
- -1540
- - 5320
- -450
- - 3040
- -450
additional_presets:
- preset_name: Piętro
map_source:
camera: camera.xiaomi_robot_vacuum_x20_map
crop:
top: -30
bottom: -45
calibration_source:
camera: true
entity: vacuum.xiaomi_robot_vacuum_x20
map_locked: true
two_finger_pan: false
language: pl
action_handler_id: true
activate_on_switch: true
activate:
service: select.select_option
service_data:
entity_id: select.xiaomi_robot_vacuum_x20_selected_map
option: Piętro
append_icons: false
tiles: []
map_modes:
- template: vacuum_clean_zone
- name: Sprzątanie punktowe
icon: mdi:map-marker-plus
selection_type: MANUAL_POINT
max_selections: 5
repeats_type: NONE
max_repeats: 5
service_call_schema:
service: script.xiaomi_vacuum_clean_spot
service_data:
selection: '[[selection]]'
repeats: '[[repeats]]'
predefined: 'false'
target:
entity_id: '[[entity_id]]'
- name: Sprzątanie po ścieżce
icon: mdi:map-marker-path
selection_type: MANUAL_PATH
max_selections: 5
repeats_type: NONE
max_repeats: 5
service_call_schema:
service: script.vacuum_follow_path
service_data:
path: '[[selection]]'
repeats: '[[repeats]]'
predefined: 'false'
target:
entity_id: '[[entity_id]]'
- template: vacuum_clean_zone_predefined
name: Strefy lista
predefined_selections:
- zones:
- - -2941
- -958
- 935
- 2558
label:
text: Łazienka
x: -1167
'y': 1452
offset_y: 35
icon:
name: mdi:bathtub
x: -1167
'y': 1452
- name: Idź do punktu
icon: mdi:map-marker-radius
selection_type: MANUAL_POINT
max_selections: 5
repeats_type: NONE
max_repeats: 5
service_call_schema:
service: script.xiaomi_vacuum_goto
service_data:
x: '[[point_x]]'
'y': '[[point_y]]'
predefined: 'false'
target:
entity_id: '[[entity_id]]'
- template: vacuum_clean_segment
predefined_selections:
- id: '1'
icon:
name: mdi:bathtub
x: -1150
'y': 500
label:
text: Łazienka
x: -1150
'y': 500
offset_y: 35
outline:
- - -2850
- -900
- - 1050
- -900
- - 1050
- 2500
- - -2850
- 2500
- id: '2'
icon:
name: mdi:face-man
x: 5150
'y': 450
label:
text: Kacper
x: 5150
'y': 450
offset_y: 35
outline:
- - 3200
- 51
- - 4137
- 51
- - 4137
- -1995
- - 7200
- -1950
- - 7200
- 2750
- - 3200
- 2750
- id: '3'
icon:
name: mdi:stairs
x: 2600
'y': 500
label:
text: Korytarz
x: 2600
'y': 500
offset_y: 35
outline:
- - 2282
- -3472
- - 2282
- -2032
- - 2357
- -25
- - 3228
- 51
- - 3228
- 3232
- - 994
- 3232
- - 994
- -934
- - -2870
- -934
- - -2870
- -2260
- - 918
- -2298
- - 918
- -3472
- id: '4'
icon:
name: mdi:sofa-outline
x: -5950
'y': -2000
label:
text: Gościnny
x: -5950
'y': -2000
offset_y: 35
outline:
- - -8950
- -4450
- - -2850
- -4450
- - -2850
- 1100
- - -8950
- 1100
- id: '5'
icon:
name: mdi:bed
x: 850
'y': -4650
label:
text: Sypialnia
x: 850
'y': -4650
offset_y: 35
outline:
- - -2850
- -6500
- - 2300
- -6500
- - 2300
- -3550
- - 956
- -3550
- - 956
- -3050
- - -2850
- -3050
- id: '6'
icon:
name: mdi:face-woman
x: 3750
'y': -4450
label:
text: Kasia
x: 3750
'y': -4450
offset_y: 35
outline:
- - 2300
- -6500
- - 7050
- -6500
- - 7050
- -2250
- - 2300
- -2250
Replace
service: script.xiaomi_vacuum_goto
with
service: dreame_vacuum.vacuum_goto
kosmaluk
(Kosmaluk)
October 19, 2024, 8:51am
1913
I have the dreame_vacuum.vacuum_goto service in the script and it works fine. In turn, the dreame_vacuum.vacuum_clean_spot service does not finish cleaning, but the vacuum cleaner idly wanders around the room. I don’t know which integration is responsible for this: Dream or Xiaomi Vacuum Card.
In addition, a request to Piotr Machowski to check such a small inconvenience in the above issue, i.e. after changing the preset and after returning, the tools that determine the point (goto, clean spot) report an error that the coordinates are outside the map, while the other tools (rooms, zones, including predefined) work ok.
Thanks for all your help
Normally app does not have this feature and older vacuums has a button for spot cleaning which works exactly how you described from the factory. API still has this command even though app does not use it but it also means the feature has not been tested by the manufacturer and anything can happen while using it. You can create an automation to trigger return to base after spot cleaning has been completed.
kosmaluk:
In addition, a request to Piotr Machowski to check such a small inconvenience in the above issue, i.e. after changing the preset and after returning, the tools that determine the point (goto, clean spot) report an error that the coordinates are outside the map
Message has been generated by the integration not the card so Piotr cannot solve this and that is why I suggested to use the service call instead of a script. Error means x and y coordinates that you have passed to the service does not coincide with floor inside the map and even tough integration send that coordinates to the device it will say it is unreachable.
pissten
(Pissten)
October 21, 2024, 7:14am
1915
@3_14
Thank you very much for all your great work and sharings for this community!
Could I please ask for a little advise regarding the map size cropping possibilties?
I would really like to crop the map image so that there are no empty space left under the actual map. is that possible?
config:
calibration_source:
camera: true
entity: vacuum.roborock_s5_max
icons:
- conditions:
- entity: vacuum.roborock_s5_max
value_not: cleaning
- entity: vacuum.roborock_s5_max
value_not: error
- entity: vacuum.roborock_s5_max
value_not: returning
icon: mdi:play
tap_action:
action: call-service
service: vacuum.start
service_data:
entity_id: vacuum.roborock_s5_max
tooltip: Start
- conditions:
- entity: vacuum.roborock_s5_max
value_not: docked
- entity: vacuum.roborock_s5_max
value_not: idle
- entity: vacuum.roborock_s5_max
value_not: error
- entity: vacuum.roborock_s5_max
value_not: paused
icon: mdi:pause
tap_action:
action: call-service
service: vacuum.pause
service_data:
entity_id: vacuum.roborock_s5_max
tooltip: Pause
- conditions:
- entity: vacuum.roborock_s5_max
value_not: docked
- entity: vacuum.roborock_s5_max
value_not: idle
- entity: vacuum.roborock_s5_max
value_not: error
- entity: vacuum.roborock_s5_max
value_not: paused
icon: mdi:stop
tap_action:
action: call-service
service: vacuum.stop
service_data:
entity_id: vacuum.roborock_s5_max
tooltip: Stop
- conditions:
- entity: vacuum.roborock_s5_max
value_not: docked
- entity: vacuum.roborock_s5_max
value_not: returning
icon: mdi:home-map-marker
tap_action:
action: call-service
service: vacuum.return_to_base
service_data:
entity_id: vacuum.roborock_s5_max
tooltip: Return to base
- conditions:
- entity: vacuum.roborock_s5_max
value_not: docked
- entity: vacuum.roborock_s5_max
value_not: error
- entity: vacuum.roborock_s5_max
value_not: cleaning
- entity: vacuum.roborock_s5_max
value_not: returning
icon: mdi:target-variant
tap_action:
action: call-service
service: vacuum.clean_spot
service_data:
entity_id: vacuum.roborock_s5_max
tooltip: Clean spot
- icon: mdi:map-marker
tap_action:
action: call-service
service: vacuum.locate
service_data:
entity_id: vacuum.roborock_s5_max
tooltip: Locate
- conditions:
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value: 'off'
icon: mdi:fan-alert
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_s5_max
fan_speed: silent
tooltip: Change fan speed
- conditions:
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value: silent
icon: mdi:fan-alert
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_s5_max
fan_speed: balanced
tooltip: Change fan speed
- conditions:
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value: balanced
icon: mdi:fan-alert
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_s5_max
fan_speed: turbo
tooltip: Change fan speed
- conditions:
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value: turbo
icon: mdi:fan-alert
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_s5_max
fan_speed: max
tooltip: Change fan speed
- conditions:
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value: max
icon: mdi:fan-alert
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_s5_max
fan_speed: max_plus
tooltip: Change fan speed
- conditions:
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value: max_plus
icon: mdi:fan-alert
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_s5_max
fan_speed: custom
tooltip: Change fan speed
- conditions:
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value: custom
icon: mdi:fan-alert
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_s5_max
fan_speed: 'off'
tooltip: Change fan speed
- conditions:
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value_not: 'off'
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value_not: silent
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value_not: balanced
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value_not: turbo
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value_not: max
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value_not: max_plus
- attribute: fan_speed
entity: vacuum.roborock_s5_max
value_not: custom
icon: mdi:fan-alert
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roborock_s5_max
fan_speed: 'off'
tooltip: Change fan speed
map_locked: true
map_modes:
- coordinates_rounding: true
icon: mdi:floor-plan
max_repeats: 3
max_selections: 999
name: Rooms
predefined_selections:
- icon:
name: mdi:broom
x: 26750
y: 28075
id: '16'
label:
offset_y: 35
text: Ida
x: 26750
y: 28075
outline:
- - 24920
- 29460
- - 28371
- 29499
- - 28450
- 26714
- - 25037
- 26636
- - 24920
- 29460
- icon:
name: mdi:broom
x: 24449
y: 23616
id: '19'
label:
offset_y: 35
text: Hovedsov
x: 24449
y: 23616
outline:
- - 26018
- 24596
- - 21468
- 24557
- - 21507
- 21654
- - 24488
- 21772
- - 24488
- 22125
- - 26018
- 22203
- - 25979
- 24635
- icon:
name: mdi:broom
x: 23390
y: 25969
id: '20'
label:
offset_y: 35
text: Bad
x: 23390
y: 25969
outline:
- - 24959
- 24714
- - 21468
- 24635
- - 21468
- 27891
- - 22331
- 27891
- - 22370
- 27028
- - 24959
- 27107
- - 24998
- 24753
- icon:
name: mdi:broom
x: 32647
y: 28087
id: '21'
label:
offset_y: 35
text: Stue
x: 32647
y: 28087
outline:
- - 28371
- 30245
- - 28568
- 25145
- - 36648
- 25342
- - 36530
- 30480
- - 28332
- 30323
- icon:
name: mdi:broom
x: 26959
y: 25538
id: '22'
label:
offset_y: 35
text: Gang
x: 26959
y: 25538
outline:
- - 25037
- 26558
- - 28411
- 26675
- - 28411
- 25224
- - 28528
- 23929
- - 28646
- 22517
- - 28371
- 22243
- - 26096
- 22203
- - 25979
- 24635
- - 25076
- 24635
- - 25037
- 26518
- icon:
name: mdi:broom
x: 32750
y: 23300
id: '23'
label:
offset_y: 35
text: Kjokken
x: 32750
y: 23300
outline:
- - 31039
- 24635
- - 33981
- 24675
- - 34059
- 23223
- - 34648
- 23184
- - 34648
- 22125
- - 34648
- 22007
- - 31666
- 21929
- - 31666
- 23184
- - 31000
- 23223
- - 31000
- 24557
- icon:
name: mdi:broom
x: 29800
y: 23325
id: '24'
label:
offset_y: 35
text: Mats
x: 29800
y: 23325
outline:
- - 28700
- 22550
- - 30900
- 22550
- - 30900
- 24100
- - 28700
- 24100
- icon:
name: mdi:broom
x: 23743
y: 28480
id: '25'
label:
offset_y: 35
text: Vaskerom
x: 23743
y: 28480
outline:
- - 24959
- 27107
- - 23978
- 27107
- - 23900
- 27852
- - 22605
- 27813
- - 22527
- 28127
- - 21428
- 28166
- - 21428
- 29421
- - 24802
- 29499
- - 24959
- 27107
- icon:
name: mdi:broom
x: 37197
y: 24086
id: '26'
label:
offset_y: 35
text: Kosekrok
x: 37197
y: 24086
outline:
- - 38609
- 25420
- - 34530
- 25302
- - 34765
- 22007
- - 38727
- 22125
- - 38688
- 25420
repeats_type: REPEAT
run_immediately: false
selection_type: ROOM
service_call_schema:
service: roborock.vacuum_clean_segment
service_data:
entity_id: '[[entity_id]]'
segments: '[[selection]]'
variables: {}
- coordinates_rounding: true
icon: mdi:select-drag
max_repeats: 3
max_selections: 5
name: Zone cleanup
predefined_selections: []
repeats_type: EXTERNAL
run_immediately: false
selection_type: MANUAL_RECTANGLE
service_call_schema:
service: roborock.vacuum_clean_zone
service_data:
entity_id: '[[entity_id]]'
repeats: '[[repeats]]'
zone: '[[selection]]'
variables: {}
- coordinates_rounding: true
icon: mdi:map-marker-plus
max_repeats: 1
max_selections: 999
name: Pin & Go
predefined_selections: []
repeats_type: NONE
run_immediately: false
selection_type: MANUAL_POINT
service_call_schema:
service: roborock.vacuum_goto
service_data:
entity_id: '[[entity_id]]'
x_coord: '[[point_x]]'
y_coord: '[[point_y]]'
variables: {}
map_source:
camera: camera.roborock_s5_max_map
tiles:
- attribute: status
entity: vacuum.roborock_s5_max
icon: mdi:robot-vacuum
label: Status
tile_id: status
translations:
charger disconnected: Charger disconnected
charging: Charging
charging complete: Charging complete
charging problem: Charging problem
cleaning: Cleaning
device offline: Device offline
docking: Docking
emptying the bin: Emptying the bin
error: Error
going to target: Going to target
idle: Idle
manual mode: Manual mode
paused: Paused
remote control active: Remote control active
returning home: Returning home
segment cleaning: Segment cleaning
shutting down: Shutting down
spot cleaning: Spot cleaning
starting: Starting
updating: Updating
zoned cleaning: Zoned cleaning
- attribute: battery_level
entity: vacuum.roborock_s5_max
icon_source: vacuum.roborock_s5_max.attributes.battery_icon
label: Battery
tile_id: battery_level
unit: '%'
- attribute: fan_speed
entity: vacuum.roborock_s5_max
icon: mdi:fan
label: Fan speed
tile_id: fan_speed
translations:
auto: Auto
gentle: Gentle
medium: Medium
silent: Silent
standard: Standard
turbo: Turbo
- entity: sensor.roborock_s5_max_sensor_dirty_left
hold_action:
action: call-service
confirmation: {}
service: vacuum.send_command
service_data:
command: reset_consumable
entity_id: vacuum.roborock_s5_max
params: sensor_dirty_time
icon: mdi:eye-outline
label: Sensors left
multiplier: 0.0002777777777777778
precision: 0
tile_id: sensor_dirty_left
translations: {}
unit: h
- entity: sensor.roborock_s5_max_filter_left
hold_action:
action: call-service
confirmation: {}
service: vacuum.send_command
service_data:
command: reset_consumable
entity_id: vacuum.roborock_s5_max
params: filter_work_time
icon: mdi:air-filter
label: Filter left
multiplier: 0.0002777777777777778
precision: 0
tile_id: filter_left
translations: {}
unit: h
- entity: sensor.roborock_s5_max_main_brush_left
hold_action:
action: call-service
confirmation: {}
service: vacuum.send_command
service_data:
command: reset_consumable
entity_id: vacuum.roborock_s5_max
params: main_brush_work_time
icon: mdi:brush
label: Main brush left
multiplier: 0.0002777777777777778
precision: 0
tile_id: main_brush_left
translations: {}
unit: h
- entity: sensor.roborock_s5_max_side_brush_left
hold_action:
action: call-service
confirmation: {}
service: vacuum.send_command
service_data:
command: reset_consumable
entity_id: vacuum.roborock_s5_max
params: side_brush_work_time
icon: mdi:brush
label: Side brush left
multiplier: 0.0002777777777777778
precision: 0
tile_id: side_brush_left
translations: {}
unit: h
title: ''
two_finger_pan: true
type: custom:xiaomi-vacuum-map-card
vacuum_platform: default
3_14
(Piotr Machowski)
October 21, 2024, 3:46pm
1916
Which integration have you used to get this map camera?
camera.roborock_s5_max_map
pissten
(Pissten)
October 21, 2024, 4:31pm
1917
the custom integration for roborock. v1.0.13
3_14
(Piotr Machowski)
October 21, 2024, 6:11pm
1918
calibration_source:
camera: true
entity: vacuum.roborock_s5_max
map_locked: true
map_modes:
- template: vacuum_clean_segment
predefined_selections:
- icon:
name: mdi:broom
x: 26750
y: 28075
id: '16'
label:
offset_y: 35
text: Ida
x: 26750
y: 28075
outline:
- - 24920
- 29460
- - 28371
- 29499
- - 28450
- 26714
- - 25037
- 26636
- - 24920
- 29460
- icon:
name: mdi:broom
x: 24449
y: 23616
id: '19'
label:
offset_y: 35
text: Hovedsov
x: 24449
y: 23616
outline:
- - 26018
- 24596
- - 21468
- 24557
- - 21507
- 21654
- - 24488
- 21772
- - 24488
- 22125
- - 26018
- 22203
- - 25979
- 24635
- icon:
name: mdi:broom
x: 23390
y: 25969
id: '20'
label:
offset_y: 35
text: Bad
x: 23390
y: 25969
outline:
- - 24959
- 24714
- - 21468
- 24635
- - 21468
- 27891
- - 22331
- 27891
- - 22370
- 27028
- - 24959
- 27107
- - 24998
- 24753
- icon:
name: mdi:broom
x: 32647
y: 28087
id: '21'
label:
offset_y: 35
text: Stue
x: 32647
y: 28087
outline:
- - 28371
- 30245
- - 28568
- 25145
- - 36648
- 25342
- - 36530
- 30480
- - 28332
- 30323
- icon:
name: mdi:broom
x: 26959
y: 25538
id: '22'
label:
offset_y: 35
text: Gang
x: 26959
y: 25538
outline:
- - 25037
- 26558
- - 28411
- 26675
- - 28411
- 25224
- - 28528
- 23929
- - 28646
- 22517
- - 28371
- 22243
- - 26096
- 22203
- - 25979
- 24635
- - 25076
- 24635
- - 25037
- 26518
- icon:
name: mdi:broom
x: 32750
y: 23300
id: '23'
label:
offset_y: 35
text: Kjokken
x: 32750
y: 23300
outline:
- - 31039
- 24635
- - 33981
- 24675
- - 34059
- 23223
- - 34648
- 23184
- - 34648
- 22125
- - 34648
- 22007
- - 31666
- 21929
- - 31666
- 23184
- - 31000
- 23223
- - 31000
- 24557
- icon:
name: mdi:broom
x: 29800
y: 23325
id: '24'
label:
offset_y: 35
text: Mats
x: 29800
y: 23325
outline:
- - 28700
- 22550
- - 30900
- 22550
- - 30900
- 24100
- - 28700
- 24100
- icon:
name: mdi:broom
x: 23743
y: 28480
id: '25'
label:
offset_y: 35
text: Vaskerom
x: 23743
y: 28480
outline:
- - 24959
- 27107
- - 23978
- 27107
- - 23900
- 27852
- - 22605
- 27813
- - 22527
- 28127
- - 21428
- 28166
- - 21428
- 29421
- - 24802
- 29499
- - 24959
- 27107
- icon:
name: mdi:broom
x: 37197
y: 24086
id: '26'
label:
offset_y: 35
text: Kosekrok
x: 37197
y: 24086
outline:
- - 38609
- 25420
- - 34530
- 25302
- - 34765
- 22007
- - 38727
- 22125
- - 38688
- 25420
- template: vacuum_clean_zone
- template: vacuum_goto
vacuum_platform: humbertogontijo/homeassistant-roborock
map_source:
camera: camera.roborock_s5_max_map
crop:
top: 0
bottom: 128
left: 0
right: 0
pissten
(Pissten)
October 21, 2024, 6:28pm
1919
Thanks! the cropping seems to be working in preview mode, in card editor. But as soon as i press finish, the view is back to “normal” ( no cropping applied )
VietNgoc
(Ngoc John)
October 22, 2024, 5:45am
1920
Is that the view panel? For example, you can split it into two parts, one for the control and one for the map. Then use a vertical stack or something similar
3_14
(Piotr Machowski)
October 22, 2024, 9:44am
1921
You can try increasing the bottom crop value. Unfortunately at this moment it is dependent on image size, so it looks fine in the editor, but after the image is enlarged the previous crop value is too small
tomas1
(Tomas)
October 22, 2024, 12:24pm
1922
That’s a bummer in otherwise perfect card. Not quite possible to display it nicely on multiple devices. Is there any chance of changing the crop to percentage?
kosmaluk
(Kosmaluk)
October 22, 2024, 12:39pm
1923
Thank you taschacki for the explanation.
I use the dream_vacuum.vacuum_goto action and it works well.
The dream_vacuum.vacuum_clean_spot service, as I wrote, does not finish cleaning and does not return to the database - I solved it in the script by entering the “cleaning time” variable and it is also ok.
There remains the question of error. which appears after changing the preset, i.e. I go to the second floor map and return back to the ground floor map:
selection modes: "clean segment:, “clean zone” and all predefined modes - works ok.
selection modes: “goto”, “clean spot”, “path” - they report an error that the point coordinates are outside the map.
When I start any mode from point 1, the modes from point 2 start working normally.
I often move the vacuum cleaner between floors and it is a bit troublesome.
Perhaps you will know where this error may come from and how to fix it.
It seems to me that it concerns not integration but the card (the message in the middle of the photo comes from the card).
I will be very grateful for your understanding and any help.
Regards
I have already told you that the message does not generated from the card but from the integration.
1 Like
kosmaluk
(Kosmaluk)
October 22, 2024, 2:33pm
1925
I understand that the error comes from integration, but is this your integration? (vacuum_platform: Tasshack/dreame-vacuum).
So, are you able to help me solve this error in the current thread? Should I move this thread to you (GitHub - Tasshack/dreame-vacuum: Home Assistant integration for Dreame robot vacuums with map support )?
Please explain to me