Mopping once a month

Hello, I’ve been trying to figure out how to have my Roborock S7 automatically mop the floor once a month, preferably in the weekend. I’ve setup vacuuming when I’m not home which works perfectly, but can’t quite figure out mopping. I’m using the humbertogontijo/homeassistant-roborock integration.
This is pretty much what I want:

Trigger
When leaving home zone

Conditions
Has vacuumed today (have a toggle to check that)
Been a month since mopping (not sure how to do this)
It’s weekend

Action
Send notification if it should start mopping, if yes then: check/wait for vacuum 100% charged
Start mopping

This is what I have at the moment, haven’t setup the notification yet as I first wanted to figure out how to have the mopping happen once a month
Would also be nice that if I stay home one weekend it’ll ask me the next weekend until I say confirm, and then don’t ask for another month

alias: Vacuum mopping
description: ""
trigger:
  - platform: zone
    entity_id: person.me
    zone: zone.home
    event: leave
condition:
  - condition: and
    conditions:
      - condition: state
        entity_id: vacuum.roborock_s7_maxv
        state: docked
      - condition: time
        weekday:
          - sun
          - sat
          - fri
        after: "12:00:00"
        before: "20:00:00"
      - condition: state
        state: "on"
        entity_id: input_boolean.cleaned
action:
  - wait_for_trigger:
      - platform: state
        entity_id:
          - vacuum.roborock_s7_maxv
        attribute: battery
        to: "100"
  - service: vacuum.set_fan_speed
    data:
      fan_speed: "Off"
    target:
      entity_id: vacuum.roborock_s7_maxv
  - service: roborock.vacuum_set_mop_mode
    data:
      mop_mode: deep_plus
    target:
      entity_id: vacuum.roborock_s7_maxv
  - device_id: 904c041a0d81c06d6a7cdf1dab
    domain: vacuum
    entity_id: vacuum.roborock_s7_maxv
    type: clean
mode: single

If the robot does not provide a sensor for last time mopping occured, that is the first thing you will need to provide, either through another input boolean or a template sensor. It would help if you could provide the entity information for the robot from the States tool in the Developer Tools menu.

If you have a state when it’s mopping then that can be good enough.
Just use this state in an automation and set a datetime with {{ now() }}

Hmm, good points, there is no state for the last time it mopped, however I could perhaps somehow check the last time the mop_intensity changed. Or indeed use a boolean, although I’m not sure how to have it wait for a month to change the boolean, doubt that would be done with a timer?

fan_speed_list:
  - 'off'
  - silent
  - balanced
  - turbo
  - max
  - max_plus
  - custom
mop_mode_list:
  - standard
  - deep
  - deep_plus
  - custom
mop_intensity_list:
  - 'off'
  - mild
  - moderate
  - intense
  - custom
battery_level: 100
battery_icon: mdi:battery-charging-100
fan_speed: silent
msg_ver: 2
msg_seq: 2311
state: docked
battery: 100
clean_time: 3254
clean_area: 40190000
error_code: 0
map_present: 1
in_cleaning: 0
in_returning: 0
in_fresh_state: 1
lab_status: 1
water_box_status: 1
back_type: -1
wash_phase: 0
wash_ready: 0
fan_power: 101
dnd_enabled: 1
map_status: 3
is_locating: 0
lock_status: 0
water_box_mode: 203
water_box_carriage_status: 1
mop_forbidden_enable: 1
camera_status: 3493
is_exploring: 0
home_sec_status: 0
home_sec_enable_password: 1
adbumper_status:
  - 0
  - 0
  - 0
water_shortage_status: 0
dock_type: 3
dust_collection_status: 0
auto_dust_collection: 1
avoid_count: 113
mop_mode: standard
debug_mode: 0
collision_avoid_status: 1
switch_map_mode: 0
dock_error_status: 0
charge_status: 1
unsave_map_reason: 0
unsave_map_flag: 0
status: charging
mop_intensity: intense
error: None
icon: mdi:robot-vacuum
friendly_name: Roborock S7 MaxV
supported_features: 16383

That part can be handle a couple ways… but not with a timer. The most basic is as @Hellis81 mentioned, set the value of a datetime helper. That datetime helper then becomes the basis for a trigger and/or condition.