How to add time to existing datetime helper

I’ve done a decent amount of searching and haven’t found quite what I’m looking for, so hoping for some help here. What I’m trying to do is set up a script where, when run, it adds an hour to the existing value of a datetime helper - so, if the current value is 6pm, when run it changes that to 7pm. However, as written, the value is set to an hour from now, not an hour from the current value. I’m quite certain I’ve got something wrong in the code, so I’m hoping someone can point out what that is.

Here’s what I’ve got:

alias: Extend Side Yard Activity
  - service: input_datetime.set_datetime
    metadata: {}
      datetime: "{{ (state_attr('input_datetime.side_yard_activity_end', 'timestamp') + 3600) | timestamp_custom ('%Y-%m-%d %H:%M:%S') }}"
      entity_id: input_datetime.side_yard_activity_end
mode: single
icon: mdi:clock-time-one

Thanks in advance!

What about

      datetime: {{ today_at(states('input_datetime.side_yard_activity_end')) + timedelta(hours=1) }}


That got me closer, though I error out with (I think because I’m including the date and not just the time):

Error: Error rendering data template: ValueError: could not convert str to datetime: '2024-01-05 17:42:35'

However, that gave me the syntax I couldn’t figure out (HA newbie here obviously!), and what did end up working was:

datetime: "{{ (as_timestamp(states('input_datetime.side_yard_activity_end')) + 3600)|timestamp_custom('%Y-%m-%d %H:%M:%S') }}""

It’s as simple as this:

      timestamp: "{{ state_attr('input_datetime.side_yard_activity_end', 'timestamp') + 3600 }}"