Stopwatch with start/stop/resume, lap and reset

Hi @miguelpucela,
hope you might be able to help me.
when i start the stop watch via input_boolean.start_stopwatch the tic tac starts. but the stop watch only moves from Unknown to Unavailable?

if i template

{{states('sensor.stopwatch')}}

all i get is unavailable. not any number what so ever. perhaps i have made a mistake in setup?

your code was pasted under a package like this:

homeassistant:
  packages:
    stop_watch:
      input_boolean:
        start_stopwatch:
          # It triggers stopwatch to start/stop(pause)
          name: Start/Stop Stopwatch
        #    initial: off
        reset_stopwatch:
          # It triggers stopwatch to reset
....................................

etc.

any chance you could help me?