Vacuum Robot go to trash can after cleanup on Mondays

Your Robot charges under a couch or any other furniture item and you can’t reach it to empty the bin?

I have the Solution for you:

I have modified Pavax’s “Timeslot sheduler” to drive to the trash bin after cleanup on certain days. (Source: ⏱ Scheduled Timeslot Automation (e.g., Vacuum))

It isn’t perfect and honestly I’m to dumb to put it into a real blueprint, but I hope some of you can get some use/ideas out of it.

Here’s the code:

alias: Staubsauger
description: ''
use_blueprint:
  path: pavax/scheduled_timeslot.yaml
  input:
    condition_state_03: 'on'
    monday_enabled: true
    wednesday_enabled: true
    friday_enabled: true
    saturday_enabled: true
    time_from: '09:00:00'
    time_to: '16:00:00'
    last_triggered: input_datetime.robot_automation_last_triggered
    scheduled_action:
      - device_id: #your vacuum
        domain: vacuum
        entity_id: # your vacuum
        type: clean
      - condition: time
        after: '08:00'
        before: '20:00'
        weekday:
          - wed
          - sat
      - wait_for_trigger:
          - platform: device
            device_id: #your vacuum
            domain: vacuum
            entity_id: #your vacuum
            type: docked
            for:
              hours: 0
              minutes: 0
              seconds: 2
              milliseconds: 0
        continue_on_timeout: false
        timeout: '7200'
      - service: script.staubbehalter_leeren
# "staubsauger_leeren" is just a script which drives to the trash can
    condition_state_02: 'on'
    condition_state_01: 'on'
2 Likes

Very interesting! Could you share the script?

script.staubbehalter_leeren

Oh, yeah. (btw. sorry for the german name.)

It’s just a simple goto command.

alias: Staubbehälter leeren
sequence:
  - service: xiaomi_miio.vacuum_goto
    data:
      x_coord: '23275'
      y_coord: '27435'
    target:
      entity_id: vacuum.roborock_vacuum_s5
mode: single
icon: mdi:broom

The coordinates you can find via the Xiaomi Cloud Map Extractor under vacuum_position

Perfect, thanks!