History stats count hours state on

Hi i try make sensor to count hours state on and stops after 1000h
I use for that history state

  - platform: history_stats
    name: Lampa UV Akwarium
    entity_id: switch.lampa_uv_akwarium
    state: 'on'
    type: time
    start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
    end: "{{ now().replace(hour=10000, minute=0, second=0) }}"

Now got sensor unknow and error

I try also ends duration:
and no luck

Any clue how make end to count 10000 hours (state on only) and reset to 0 after that number?

I think you misunderstand the history stats sensor. The sensor measures how long something has been in a certain state in the given time period.

Then impossible to make how long switch been in the state on to the count “hours” on only for 1000h
I try to make count when I need UV lamp replacement in aquarium