History_stats time format

I’m trying to create a graph that shows how many times my sump pump runs a day and then I will probably overlay that against the daily rainfall from my weather station.

I cannot seem to get the history_stats format correct. I am using the UI. My duration is 1 day and I have followed many examples of time formats for the start field, but I continue to get formatting errors.

This:
'{{ as_timestamp(now().replace(hour=0, minute=0, second=0)) }}'
results in:
Parsing error: start must be a datetime or a timestamp: could not convert string to float: "'1751774400.264761'"

and this:
'{{ now().replace(hour=0, minute=0, second=0) }}'
results in:
Parsing error: start must be a datetime or a timestamp: could not convert string to float: "'1751774400.339319'"

and this:
"{{ now().replace(hour=3, minute=0, second=0, microsecond=0) }}"
results in:
Parsing error: start must be a datetime or a timestamp: could not convert string to float: '"2025-07-06 03:00:00-04:00"'

Hi, this is my daily hiostory stat, (no quotes)

Start

{{ now().replace(hour=0, minute=0, second=0) }}

End

{{ now() }}

it doesn’t seem to like it without any quotes.

Click the X on Duration. It doesn’t like that you’re providing all 3 options, you can only do 2.

as karwosts said.

Thank you! Now, I can either use:

start: {{ now().replace(hour=0, minute=0, second=0) }}
end: {{ now() }}

or

start: {{ now().replace(hour=0, minute=0, second=0) }}
duration: 1 day

any reason I’d use one format over the other?

I think they’re basically equivalent.

You can also use:

start: {{ today_at() }}

Is a bit more succinct.