Timers - WTH?

So I use timers perhaps more the most folks. First off, I’m a chef. I use them 10 or more times a day on Alexa. My hands are dirty, and saying “Alexa, set a bread rising timer for 3 hours” is WAY easier than fat fingering a timer device. Add to this my wife who set half a dozen timers all day " Alexa set a Champaigne timer for 30 minutes." or “Alexa set a workout timer for 1 hour” ( I secretly wish she’d actually set this timer)…

So now we have VPE with ITS OWN TIMERS in ESPHome. Not to complicate things, but you CANNOT access these times w/out major grief… (Voice PE - Implementing display of Named Timers in HA *working... sort of*)
Yup, I wrote those experimental routines. I’m obsessed w/ timers.

So now the Core HA team has to come to terms w/ th ESPHome team and decide who’s going to “win” the timer war.

Here’s my 1 cent. HA has built in timers already. they can be used ANYWHERE. LoveLace, automations, scenes, etc. Why is ESPHome insisting on implementing their own?

VPE " OK NABU Set a Bread Timer for 60 minutes" should start a HA timer for 60 minutes. NOT an ESPHome timer. ESPhome timers are lame - you cant reference them, or act on them. And they are not more precise than HA timers, by definition. They’re TIMERS!
The LEDs on the VPE can absolutely get their value from HA. and it needs to not be at 1s intervals. I literally cannot think of a SINGLE timer constraint that requireds resolution greater than 5s updates. Perhaps some complex science experiment, but VPE isn’t intended for that…

So, Timers in VPE need RETHINKING.
QED!!!

2 Likes

I stole this from somebody (and I’m ashamed to say I can’t remember who - sorry whoever you are :flushed:).

  CustomTimerSet:
    action:
      - service: timer.start
        target:
          entity_id: timer.voice_timer
        data:
          duration: >-
              {%- if time_unit1 == 'hour[s]' -%}
              {{ '%02d' % duration1 | int + ':' }}
              {%- if duration2 == empty -%}
                {{ '00:' }}
              {%- else -%}
                {{ '%02d' % duration2  | int + ':'}}
              {%- endif %}
              {%- if duration3 == empty -%}
                {{ '00' }}
              {%- else -%}
                {{ '%02d' % duration3 | int }}
              {%- endif %}
              {%- elif time_unit1 == 'minute[s]' -%}
              {{ '00:' + '%02d' % duration1 | int + ':' }}
              {%- if duration2 == empty -%}
                {{ '00' }}
              {%- else -%}
                {{ '%02d' % duration2 }}
              {%- endif %}
              {%- elif time_unit1 == 'second[s]' -%}
              {{ '00:00:' + '%02d' % duration1 | int }}
              {%- endif %}
      - service: script.willow_tts_response
        data:
          tts_sentence: OK. Timer started.

Still a work in progress, but at least it leverages a normal HA timer, so you can have it on dashboards etc. You have to have predefined timers, though.

Interesting. It looks like something from the Willow LLM Server days. Where do you put that code? And still no timer name since you have to create a named helper timer called timer.voice_timer

It is. I’ve still got my own local WIS running.

I do all my TTS through a script which decides which speakers to use, based on movement etc. This is not really comparable with VPE - a separate TTS engine (Amazon Polly) and all interaction defined in custom sentences and intents. It can still control everything exposed to Assist, though.

You’re right, the big limitation in the timer is the helper. Still thinking about that.