I find myself working overtime a few hours every month. Typically, I just write down the time worked and submit it to HR at the end of the month. I’m wondering what suggestions you guys have for manually tracking time.
Something like a “stopwatch” card where I can start/stop/pause and it adds the cumulative total to an entity until I manually reset.
So far, I have created an input boolean (input_boolean.stopwatch
) and added the history stats integration like this, but from what I understand this will automatically reset at midnight.
- platform: history_stats
name: Overtime Worked
entity_id: input_boolean.stopwatch
state: “on”
type: time
start: “{{ now().replace(hour=0, minute=0, second=0) }}”
end: “{{ now() }}”
I would like it to never reset, unless I reset the history stats for the sensor. Also, I’m stuck on figuring out how to reset the stats for the Overtime Worked sensor. I can manually set the sensor.overtime_worked
state to 0.0 from Developer Tools, but I’m not sure how to create a script or automation to set it to 0 or reset it.
Any suggestions?