Robot Vacuum reminder for other floors

This is a blueprint that sends notifications to your phone with the option to snooze the reminder.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.
I have a Roborock S7 MaxV ultra and multiple floors that need cleaning. In short, one floor is cleaned automatically, but for the others I need to bring the robot to clean them, but I never really did it on a fixed schedule. I could just make a calendar, but I prefer to do it when I’m working from home and then preferably only if the last time was a certain amount of days ago.

This automation will keep track of the next day the cleaning has to take place, for this reason you need to create an input_datetime helper to store the date in. It will use the vacuum sensors to check if the cleaning was done and then automatically plan the next date. If noone is home, it will not send a reminder and just remind you the next time when it is possible.

blueprint:
  name: Reminder to clean a floor with the vacuum
  description: 'Sends a notification with a reminder to clean a certain floor, allowing for snoozing a day and if a binary sensor is on (for instance tracking if anyone is home)'
  domain: automation
  input:
    clean_date:
      name: Date sensor
      description: "This entity will hold the date of the next planned clean. It needs to be an input_datetime helper entity set to 'Date'."
      selector:
        entity:
          domain: input_datetime
    map_sensor:
      name: Map sensor
      description: "sensor showing the current map being cleaned. Will be used to signal that a clean has started together with the robot sensor"
      selector:
        entity:
          domain: 
            - sensor
            - select
    map_name:
      name: Map name
      description: Map name of the floor to be cleaned. Needs to match the value in the Map sensor.
      selector:
        text:
    vacuum:
      name: vacuum
      description: "The vacuum entity, keeps track of the vacuum state"
      selector:
        entity:
          domain: vacuum
    home:
      name: home
      description: Binary sensor or person checking if the action can be completed i.e. that someone is at home
      selector:
        entity:
          domain: 
            - person
            - binary_sensor
    reminder_time_start:
      name: Reminder time start
      description: "Earliest time when the reminder should be sent."
      default: '10:00'
      selector:
        time:
    reminder_time_end:
      name: Reminder time end
      description: "Latest time when the reminder should be sent, is used in conjunction with the available sensor, so will trigger if in this time window and coming home from instance"
      default: '18:00'
      selector:
        time:
    interval_days:
      name: Interval in days
      description: "The interval between the cleaning"
      default: 7
      selector:
        number:
          min: 0
          max: 50
          mode: slider
          unit_of_measurement: days
    notification_title:
      name: Title of the notification
      description: "Title of the notification that will be sent."
      default: "Bedroom needs cleaning"
      selector:
        text:
    notification_message:
      name: Message of the notification
      description: "Message of the notification that will be sent."
      default: "The roborock needs to be brought to the bedroom, it has been 7 days already"
      selector:
        text:
    notify_device:
      name: Notify device
      description: "The device where the notification should be sent to."
      selector:
        device:
trigger_variables:
  clean_date:   !input clean_date
  interval_days:          !input interval_days
  map_name: !input map_name
  action_name_snooze: >-
    {{ "snooze_clean_" ~ map_name }}

trigger:
  - platform: time
    at: !input reminder_time_start
    id: send_message

  - platform: state
    entity_id: !input home
    to: 
      - "on"
      - "home"
    id: send_message

  - platform: state
    entity_id: !input vacuum
    to: cleaning
    id: cleaning

  - platform: state
    entity_id: !input map_sensor
    to: !input map_name
    id: cleaning

  - platform: event
    event_type: mobile_app_notification_action
    id: snooze
    event_data:
      action: "{{ action_name_snooze }}"

condition:
  - condition: or
    conditions:
      - condition: and
        conditions:
          - condition: trigger
            id: send_message
          - condition: time
            after: !input reminder_time_start
            before: !input reminder_time_end
          - condition: template
            value_template: |
              {{ now() >= states(clean_date) | as_datetime | as_local }}
      - condition: and
        conditions:
          - condition: trigger
            id:
              - cleaning
          - condition: state
            entity_id: !input vacuum
            state: cleaning
          - condition: state
            entity_id: !input map_sensor
            state: !input map_name
      - condition: trigger
        id: snooze

action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - cleaning
        sequence:
          - service: input_datetime.set_datetime
            data:
              date: |
                {{ (now() +  timedelta(days= interval_days )).date()  }}
            target:
              entity_id: !input clean_date
      - conditions:
          - condition: trigger
            id:
              - snooze
        sequence:
          - service: input_datetime.set_datetime
            data:
              date: |
                {{ (now() +  timedelta(days= 1 )).date()  }}
            target:
              entity_id: !input clean_date
      - conditions:
        - condition: trigger
          id: send_message
        sequence:
        - domain: mobile_app
          type: notify
          device_id: !input notify_device
          title:   !input notification_title
          message: !input notification_message
          data:
            actions:
            - title: Snooze
              action: "{{ action_name_snooze }}"

I have a Q Revo with multiple floors enabled and am using the standard Roborock integration, but it does not have a map name sensor. I can’t see an obvious map name sensor in the integration’s code either. Are you using a different integration, or is there some other dependency I need?

I’m using the HACS integration. As far as I know they use the same codebase, but the HACS integration is a little ahead at the moment. I’m not sure if this explains the difference though, since you also have a different vacuum.

Do you have any other indicator of which map is active? I’m using a current_map_selected entity, but I used to have just an integer available (I forget the name). That might work just as well.

I have a Dreamebot z10 Pro, but I can’t find the right entity for the map to fill in.

I do have a select.dreame_bot_z10_pro_selected_map, where I can track the last map the robot has been but I can’t select that one in the blueprint. What can I do?

I restricted the map sensor to only allow sensors. I didn’t think about selects. I think the following should work (can’t check since I’m not home atm). It simply adds the ‘select’ domain as a valid entity type. If it doesn’t work you can also simply replace ‘sensor’ with ‘select’ in the original blueprint. I’ll update the post if it works with the list though.

blueprint:
  name: Reminder to clean a floor with the vacuum
  description: 'Sends a notification with a reminder to clean a certain floor, allowing for snoozing a day and if a binary sensor is on (for instance tracking if anyone is home)'
  domain: automation
  input:
    clean_date:
      name: Date sensor
      description: "This entity will hold the date of the next planned clean. It needs to be an input_datetime helper entity set to 'Date'."
      selector:
        entity:
          domain: input_datetime
    map_sensor:
      name: Map sensor
      description: "sensor showing the current map being cleaned. Will be used to signal that a clean has started together with the robot sensor"
      selector:
        entity:
          domain: 
            - sensor
            - select
    map_name:
      name: Map name
      description: Map name of the floor to be cleaned. Needs to match the value in the Map sensor.
      selector:
        text:
    vacuum:
      name: vacuum
      description: "The vacuum entity, keeps track of the vacuum state"
      selector:
        entity:
          domain: vacuum
    home:
      name: home
      description: Binary sensor or person checking if the action can be completed i.e. that someone is at home
      selector:
        entity:
          domain: 
            - person
            - binary_sensor
    reminder_time_start:
      name: Reminder time start
      description: "Earliest time when the reminder should be sent."
      default: '10:00'
      selector:
        time:
    reminder_time_end:
      name: Reminder time end
      description: "Latest time when the reminder should be sent, is used in conjunction with the available sensor, so will trigger if in this time window and coming home from instance"
      default: '18:00'
      selector:
        time:
    interval_days:
      name: Interval in days
      description: "The interval between the cleaning"
      default: 7
      selector:
        number:
          min: 0
          max: 50
          mode: slider
          unit_of_measurement: days
    notification_title:
      name: Title of the notification
      description: "Title of the notification that will be sent."
      default: "Bedroom needs cleaning"
      selector:
        text:
    notification_message:
      name: Message of the notification
      description: "Message of the notification that will be sent."
      default: "The roborock needs to be brought to the bedroom, it has been 7 days already"
      selector:
        text:
    notify_device:
      name: Notify device
      description: "The device where the notification should be sent to."
      selector:
        device:
trigger_variables:
  clean_date:   !input clean_date
  interval_days:          !input interval_days
  map_name: !input map_name
  action_name_snooze: >-
    {{ "snooze_clean_" ~ map_name }}

trigger:
  - platform: time
    at: !input reminder_time_start
    id: send_message

  - platform: state
    entity_id: !input home
    to: 
      - "on"
      - "home"
    id: send_message

  - platform: state
    entity_id: !input vacuum
    to: cleaning
    id: cleaning

  - platform: state
    entity_id: !input map_sensor
    to: !input map_name
    id: cleaning

  - platform: event
    event_type: mobile_app_notification_action
    id: snooze
    event_data:
      action: "{{ action_name_snooze }}"

condition:
  - condition: or
    conditions:
      - condition: and
        conditions:
          - condition: trigger
            id: send_message
          - condition: time
            after: !input reminder_time_start
            before: !input reminder_time_end
          - condition: template
            value_template: |
              {{ now() >= states(clean_date) | as_datetime | as_local }}
      - condition: and
        conditions:
          - condition: trigger
            id:
              - cleaning
          - condition: state
            entity_id: !input vacuum
            state: cleaning
          - condition: state
            entity_id: !input map_sensor
            state: !input map_name
      - condition: trigger
        id: snooze

action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - cleaning
        sequence:
          - service: input_datetime.set_datetime
            data:
              date: |
                {{ (now() +  timedelta(days= interval_days )).date()  }}
            target:
              entity_id: !input clean_date
      - conditions:
          - condition: trigger
            id:
              - snooze
        sequence:
          - service: input_datetime.set_datetime
            data:
              date: |
                {{ (now() +  timedelta(days= 1 )).date()  }}
            target:
              entity_id: !input clean_date
      - conditions:
        - condition: trigger
          id: send_message
        sequence:
        - domain: mobile_app
          type: notify
          device_id: !input notify_device
          title:   !input notification_title
          message: !input notification_message
          data:
            actions:
            - title: Snooze
              action: "{{ action_name_snooze }}"
1 Like

Thank you for the fast response. I replaced sensor with Select and I was able to fill in everything. Didn’t know it was that easy haha. It would be nice if the notification would be a actionable so I can change the map the vacuum is on at that moment.

Hi if its not to much trouble for you, can you add the select in your blueprint?

Sure. just checked if it works and it does. The first post now has the updated version that supports both a sensor and a select.

1 Like

Thanks alot!