Clean room service #187
-
Hi, I have a Xiaomi Vacuum Mop P, it works well in your new card as KrzysztofHajdamowicz/miio2 platform.
where params:
I tried to configure the service in the card but something goes wrong. I think the problem is '[[selection]]' because if i replace it with the number of a room, the robot starts.
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 45 replies
-
Can you try to hold the play button and see how does service call look like? If it will be too big for popup it will be written in browser's console as well |
Beta Was this translation helpful? Give feedback.
-
will it works, if i select more than 1 room in card? |
Beta Was this translation helpful? Give feedback.
-
So is it possible to send [[selection]] data without brackets? |
Beta Was this translation helpful? Give feedback.
-
Unfortunately not working.
I think service wait integer, but card send "string" |
Beta Was this translation helpful? Give feedback.
-
Yes, it works correct with room IDs. But there is first parameter with vacuum type (0=Sweep, 1=Sweep&Mop, 2=Mop). |
Beta Was this translation helpful? Give feedback.
-
Thanks @PiotrMachowski for the additional script trick! Since the zone cleaning is not working with viomi se anymore this is how I solved multiroom cleaning: card config, with room data extracted from camera: type: custom:xiaomi-vacuum-map-card
entity: vacuum.viomi_se
vacuum_platform: marotoweb/viomise
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
map_modes:
- name: Rooms
icon: mdi:floor-plan
selection_type: ROOM
service_call_schema:
service: script.viomi_set_mode_withroom
service_data:
entity_id: '[[entity_id]]'
rooms: '[[selection]]'
predefined_selections:
- id: 13
label:
text: Bedroom
x: -1.15
'y': -5.2
offset_y: 35
icon:
name: mdi:broom
x: -1.15
'y': -5.2
- id: 11
label:
text: Bathroom
x: 1.6749999999999998
'y': -5.5
offset_y: 35
icon:
name: mdi:broom
x: 1.6749999999999998
'y': -5.5
- id: 12
label:
text: Lobby
x: 1.45
'y': -4.125
offset_y: 35
icon:
name: mdi:broom
x: 1.45
'y': -4.125
- id: 10
label:
text: Living Room
x: -0.3750000000000001
'y': -1.35
offset_y: 35
icon:
name: mdi:broom
x: -0.3750000000000001
'y': -1.35 and the script: viomi_set_mode_withroom:
sequence:
- service: vacuum.send_command
data:
entity_id: "{{ entity_id }}"
command: set_mode_withroom
params: "{{ [0, 1, rooms|count] + rooms }}" |
Beta Was this translation helpful? Give feedback.
-
Hey! Can you help me please. I have a Xiaomi Trouver LDS finder (p2036)& I don't understand why it doesn't work. I have this error... - type: custom:xiaomi-vacuum-map-card
title: Vacuum
entity: vacuum.p2036_2418c6128faa
vacuum_platform: default
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
map_modes:
- template: vacuum_goto
- template: vacuum_clean_zone
max_selections: 1
repeats_type: 5
service_call_schema:
service: xiaomi_miot.call_action
service_data:
entity_id: vacuum.p2036_2418c6128faa
siid: 4
aiid: 1
params:
- piid: 1
value: 19
- piid: 10
value: '{"areas":[[[[selection_unwrapped]],[[repeats]],1,1]]}'
force_params: true |
Beta Was this translation helpful? Give feedback.
-
so, I understand what's wrong: I had to use this service: service: xiaomi_miot_raw.call_action. But I've got another error: extra keys not allowed @ data['params']. I think it happens cause my robot has only 6 objects in MiOT |
Beta Was this translation helpful? Give feedback.
Can you try to hold the play button and see how does service call look like? If it will be too big for popup it will be written in browser's console as well