Service - prefill datetime selector

Hi,

I am trying to modify a home assistant core component

to add some more functions.

So far its working but I am not able to prefill the current date time and the current time - 1 hour.

services.yaml

remove_clients_by_date:
  description: "Removes clients whose `first_seen` is within a specific time range."
  fields:
    start_date:
      required: true
      description: "The start date in ISO 8601 format. Clients first seen after this date will be removed."
      example: "2025-01-01T00:00:00"
      selector:
        datetime: {}
    end_date:
      required: true
      description: "The end date in ISO 8601 format. Clients first seen before this date will be removed."
      example: "2025-01-20T00:00:00"
      selector:
        datetime: {}

this is how it looks

Afaik template scripting is not working inside the service.yaml files.

setting a date inside the service.py

SERVICE_REMOVE_CLIENTS_BY_DATE_SCHEMA = vol.Schema(
    {
        vol.Optional(CONF_START_DATE, default="2024-01-19T12:00:00"): vol.Coerce(datetime.fromisoformat),
        vol.Optional(CONF_END_DATE, default="2024-01-19T13:00:00"): vol.Coerce(datetime.fromisoformat),
    }
)

doesnt change anything

Any idea ?