As there is already full timer support baked into Assist, how can we bring these to the dashboard?
Yeah, we wonder that too! We went with the current approach so we can postpone that decision and then we got distracted with other priorities.
The challenge is that we have timer helper entities and they are not the same as temporary timers created by Assist. Should Assist timers exist as entities? What is their entity ID? How can one add them to a dashboard if they are created and deleted on the fly?
That’s totally fair! I don’t mind the idea of single use timers that live alongside the timer entities similar to how assist uses them now.
I’m not a developer by any means (just an aspirational enthusiast ), so I can’t speak to code or existing system limitations, but this is how I would envision it:
-
A separate
variable_timer
class - this would allow a user to create multiple variable timers while not affecting their currenttimer
entities, similar to how we haveselect
andinput_select
respectively. -
The ability (action?) to increase or decrease the timer on the fly - I know that this can (sort of) be achieved right now, but it requires automations and several helpers to create buttons from what I have seen.
-
Entity attributes similar to the current timer helper, but with the addition of
destructive
for timers that you only want for a one-time use
On the last point above about the destructive
flag: I know that this might cause confusion with existing timer
entities, but say you have a timer called variable_timer.kitchen
that you may use regularly, but you want the ability to change the duration on the fly. It then makes sense to have a non-destructive entity that can have the duration changed easily, on top of being able to be used in automations - I.e. you make an automation that when variable_timer.kitchen
ends, it notifies you on a specific device, if that makes sense?
Regarding the dashboard, I could see a timers-card
with properties similar to the many “filter” cards available, where you can have it only show active timers, or all timers, but would include buttons for start, pause, and +/- for increasing or decreasing duration.
Thoughts?
Maybe assist timers can be tagged by an assist-var-timer tag and then referenced by this tag in the dashboard.
I don’t think we necessarily need to solve the assist timers entirely, but I think at a minimum I’d love to have someplace to list and delete them. I’ve had too many accidental timers I want to cancel like “turn off the lights in 10 minutes” but couldn’t figure out the wording to do so.
I think one of the things that would help with this is a way for dynamic cards to be in the dashboard. It can be set to automatically look for entities that meet certain criteria (area, type, label, etc) and automatically populate them. For timers, if assist made a timer entity with a semi-random name and a label along the lines of “[assistant name] timer,” then those timers could load into and out of a dashboard card.
If automatic card population already exists in default HA, please point me to some documentation on it. I’ve seen a HACS solution, but not built in.
Any solution will do, for example a new class of sensors. If we have access to these entities, then the rest is easy to implement.