Script for input_datetime offset

I have a script that starts my vacuum cleaning cycle and writes the current time stamp to a Helper so that I can run the script based on the last cleaning.

I want to create a new script that will let me “skip” days. My thought is to have a script that sets the Helper current timestamp(shown below) -24 hours. How would I script that? Is there a better way to do this?

service: input_datetime.set_datetime
target:
  entity_id: input_datetime.house_last_cleaned
data:
  timestamp: "{{as_timestamp(now())}}"
service: input_datetime.set_datetime
target:
  entity_id: input_datetime.house_last_cleaned
data:
  datetime: "{{ now() - timedelta(hours=24) }}"

That’s exactly what I was after. That works perfectly. Any documentation on how you figured that out or coding in general?

The timedelta() function is listed in the Templating docs, in the Time section.