Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an additonal button for the mopping function of the S5 Max (and others) #343

Closed
Happyboy0980 opened this issue Jan 30, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@Happyboy0980
Copy link

Happyboy0980 commented Jan 30, 2022

Description

In my setup i have simply added the mopping function with a script.
This works great, but would be nicer if we could make it in the same way as is done with the fan power.
This would really make it "complete".

Scripts are very "simple" :

Mopping "off":

sequence:
  - service: vacuum.send_command
    target:
      entity_id: vacuum.roborock_s5_max
    data:
      command: set_water_box_custom_mode
      params: 200
mode: single
alias: mopping_close

Mopping "low":

sequence:
  - service: vacuum.send_command
    target:
      entity_id: vacuum.roborock_s5_max
    data:
      command: set_water_box_custom_mode
      params: 201
mode: single
alias: mopping_low

Mopping "medium":

sequence:
  - service: vacuum.send_command
    target:
      entity_id: vacuum.roborock_s5_max
    data:
      command: set_water_box_custom_mode
      params: 202
mode: single
alias: mopping_medium

mopping high :

sequence:
  - service: vacuum.send_command
    target:
      entity_id: vacuum.roborock_s5_max
    data:
      command: set_water_box_custom_mode
      params: 203
mode: single
alias: mopping_high

Also customized level is possible when i rember correctly (205) but didn't impliment this.

Feedback if the mop is attached (binary_sensor.roborock_s5_max_mop_attached)
Feedback if the waterbox is attached (binary_sensor.roborock_s5_max_water_box_attached)

As icons for the different water level i used :
mdi:water-off-outline
mdi:water-outline
mdi:water-opacity
mdi:water

Solution

Add the mopping in the same way is how the fan power is set.

Alternatives

Currently using seperate buttons to set this the mopping level.. not looking so clean...

Context

No response

@Happyboy0980 Happyboy0980 added the enhancement New feature or request label Jan 30, 2022
@PiotrMachowski
Copy link
Owner

Is there a sensor/attribute that shows currently selected water level?

@Happyboy0980
Copy link
Author

Happyboy0980 commented Jan 31, 2022

Yes there is, if you do get_status, it is "water_box_mode".

{
   "result": [{
           "msg_ver": 2,
           "msg_seq": 1433,
           "state": 2,
           "battery": 93,
           "clean_time": 40,
           "clean_area": 1127500,
           "error_code": 0,
           "map_present": 1,
           "in_cleaning": 1,
           "in_returning": 0,
           "in_fresh_state": 0,
           "lab_status": 1,
           "water_box_status": 0,
           "fan_power": 101,
           "dnd_enabled": 0,
           "map_status": 3,
           "is_locating": 0,
           "lock_status": 0,
           "water_box_mode": 200,
           "water_box_carriage_status": 0,
           "mop_forbidden_enable": 0
       }
   ],
   "id": 334
}

@PiotrMachowski
Copy link
Owner

Ok, but is it available in HA as a sensor or vacuum's attribute?

@Happyboy0980
Copy link
Author

Thanks for clarifing the isseu... Quite surprissed that this wan't expossed yet in HA..
Let me see if i can get that one expossed ..

@PiotrMachowski
Copy link
Owner

Once you get it in HA here you have an example how to add it to card:
#341

@ScottG489
Copy link

@Happyboy0980 Did you happen to make any progress on getting levels exposed? I'd also like to get the water level via the card.

I'm able to set it via the set_water_box_custom_mode service calls as you have listed here. It sounds like @PiotrMachowski is saying that it won't be able to be added to the card until the current value is exposed via HA though, which makes sense.

Off the top of my head, one solution to this would be to add a sensor that is just set to the last value you set it to with the service call. Then you could reference that in the condition.

Using what @PiotrMachowski mentioned in that discussion, I came up with this for now:

append_icons: true
icons:
  - icon: mdi:water-off-outline
    tap_action:
      action: call-service
      service: vacuum.send_command
      service_data:
        entity_id: vacuum.roborock_s6_maxv
        command: set_water_box_custom_mode
        params: 200
  - icon: mdi:water-outline
    tap_action:
      action: call-service
      service: vacuum.send_command
      service_data:
        entity_id: vacuum.roborock_s6_maxv
        command: set_water_box_custom_mode
        params: 201
  - icon: mdi:water-opacity
    tap_action:
      action: call-service
      service: vacuum.send_command
      service_data:
        entity_id: vacuum.roborock_s6_maxv
        command: set_water_box_custom_mode
        params: 202
  - icon: mdi:water
    tap_action:
      action: call-service
      service: vacuum.send_command
      service_data:
        entity_id: vacuum.roborock_s6_maxv
        command: set_water_box_custom_mode
        params: 203
  - icon: mdi:water-circle
    tap_action:
      action: call-service
      service: vacuum.send_command
      service_data:
        entity_id: vacuum.roborock_s6_maxv
        command: set_water_box_custom_mode
        params: 204
  - icon: mdi:water-plus
    tap_action:
      action: call-service
      service: vacuum.send_command
      service_data:
        entity_id: vacuum.roborock_s6_maxv
        command: set_water_box_custom_mode
        params: 207

It's a bit ugly since it shows all the water level buttons at once, but it's a good starting point.

For more context, I have an S6 MaxV and the respective water levels are Close, Low, Medium, High, Customize (per room), and Custom. I'm not sure how to specify the custom water level or to customize rooms though via HA.

@PiotrMachowski
Copy link
Owner

Done in v2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants