My idea: Start the Diesel Power Generator for nn minutes. The nn minutes I would like to control with a timer helper. The duration should be selectable with a slider (like input_number). The timer card does not provide this posibility.
The Timer works like a countdown which is exactly what I want.
Should I use a input_number that can be set using a slider in the UI and that modify input_timer with this number as minutes…???
Yes, you could use an Input number with an automation to start the timer for the desired number of minutes. Another option would be to use a Template Number, which is basically the same thing, but in a single entity.
Hi Didgeridew! (nice name).
I solved it the way you recommended:
It took me quiet a time to find out how to read the numeric helper (in minute) and give it to the timer as seconds (I was unable to format as HH.MM.SS).
action: timer.start
metadata: {}
data:
duration: |
{{states('input_number.generator_minutestorun')| float*60}}
target:
entity_id: timer.generator_duration
The gen is started and ended either by the battery SOC or the time specified .

Maybe this custom integration would interest you GitHub · Where software is built.
I used to do timer myself like you did but found this very useful cause it does some extra things like notifications and showing you total time it was on for the whole day