Pyscript - set input_datetime value

Hi all,

I’m sure this one’s very obvious but I’m unsure on the syntax and have tried various ways. Simply put I’m trying to set a datetime value using pyscript. The input I’ve tried:

date_str = "2024-06-21 14:30:00"  # Example date and time string
service.call("input_datetime", "set_datetime", entity_id="input_datetime.time_reached", datetime=date_str)

which returns: TypeError: service input_datetime.set_datetime takes no positional arguments

I then tried:

date_str = "2024-06-21 14:30:00"  # Example date and time string
service.call("input_datetime", "set_datetime", entity_id="input_datetime.time_reached", data={"datetime": date_str})

which returns: MultipleInvalid: must contain at least one of date, time, datetime, timestamp.

To me that’s very confusing given by my logic it has to take some argument (I’m guessing I’m just not understanding the formatting / syntax)