Roborock commands

I have just finished setting up the Roborock integration using this documentation: Roborock - Home Assistant

I have gotten all the ID´s for the rooms, but i now struggle to understand how i can make this useful. I would like to be able to use google assistant or make buttons that tell the vacuum to clean specific rooms. But how would i go about doing this ?

This is the example on the guide:

service: vacuum.send_command
data:
  command: app_segment_clean
  params:
    - segments:
        - 22
        - 23
    - repeat: 1
target:
  entity_id: vacuum.s7_roborock

same here. I have no idea where to get the parameters which I need to put the device into the correct mop mode for example. Are they documented somewhere? Im new to HA…

This is the only documentation i can find: GitHub - humbertogontijo/homeassistant-roborock: Roborock integration for Home Assistant. This integration uses your devices from the Roborock App

I know this post is old but if you haven’t figured it out here is how you do it. Once you have the room ID via the docs make a helper button for each room you want to clean. After you make it go back and edit it so it is exposed to your Assistant. Then go make an automation that runs when that helper button is activated. I will post mine here.

alias: 4 clean 1/2 bath
description: ""
trigger:
  - platform: state
    entity_id:
      - input_button.clean_1_2_bath
    to: null
condition: []
action:
  - service: vacuum.send_command
    target:
      entity_id: vacuum.roborock_q5
    data:
      command: app_segment_clean
      params:
        - segments:
            - 16
mode: single

I know the post is really old but I created buttons for my dashboard in case people wanted to know, you can use YAML to create manual buttons. I also made it so that the button turns green after clicking it. To make it, you need a script, a helper and a button for each room/zone.

This is for the button (one of my rooms (living room))

type: custom:mushroom-template-card
icon: mdi:sofa-outline
entity: vacuum.vacuum
primary: Clean
tap_action:
  action: perform-action
  perform_action: script.clean_living_room
  target: {}
secondary: Living Room
icon_color: >
  {{ 'green' if is_state('input_boolean.cleaning_feedback_living_room', 'on')
  else '' }}

This is for the script (make sure that you create a script for each button)

alias: Clean Living Room
sequence:
  - action: input_boolean.turn_on
    data: {}
    target:
      entity_id: input_boolean.cleaning_feedback_living_room
  - action: vacuum.send_command
    data:
      command: app_segment_clean
      params:
        - segments:
            - 22
          repeat: 1
    target:
      entity_id: vacuum.vacuum
  - delay: "00:00:02"
  - action: input_boolean.turn_off
    data: {}
    target:
      entity_id: input_boolean.cleaning_feedback_living_room
description: ""

After that create a helper (input_boolean) for each one and add each helper to config.yaml (here is the code that you can put in config)

input_boolean:
  cleaning_feedback:
    name: Cleaning Feedback
    initial: off

Note: If you don’t know how to create an input_boolean, the name has been replace to a toggle. You can just select that and that will create an input_boolean.

Hope you find this helpful, Thanks!