Timer entity platform #1407
Replies: 5 comments 7 replies
-
|
Looks like a good proposal. |
Beta Was this translation helpful? Give feedback.
-
|
Good question. I see this as a new trigger around timers, the same way we have with Media (Play media or Play a specific media). We can have timer trigger and then you select on which sub-entity of that timer you want to target the action. |
Beta Was this translation helpful? Give feedback.
-
|
I really like that this is getting traction and the proposal above looks very promising!
Thanks a lot for this! |
Beta Was this translation helpful? Give feedback.
-
|
I don't understand this:
This entity is already under the |
Beta Was this translation helpful? Give feedback.
-
|
If I understand the discussion correctly, a large part of the current design is focused on Home Assistant itself, but the perspectives of ESPHome, Assist, voice devices and third-party integrations seem to be missing. One thing that is definitely needed is a common API/entity model that allows integrations to expose and manage timers, alarms and reminders in a consistent way. Today we already have several different concepts:
Without a shared model, every integration has to invent its own representation and automations have no generic way to interact with them. From my perspective, Home Assistant should provide a common abstraction for:
A key requirement should be that timers and alarms continue to work when Home Assistant is unavailable. Devices should be able to execute locally scheduled alarms and timers without requiring a connection to HA. This also means the architecture should support synchronization in both directions: If a timer or alarm is created on a device while HA is offline, it should be synchronized back to HA once connectivity is restored. In other words, HA should not necessarily be the only source of truth. The model should support distributed ownership and reconciliation of timers and alarms across devices and Home Assistant. This would also allow Assist, ESPHome devices, dashboards and automations to interact with timers and alarms through the same API while maintaining offline functionality and resilience. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
((wrote together with @arturpragacz and @synesthesiam ))
Context
Timers are currently implemented as helpers, living under a general-purpose helper infrastructure. This works well for manually configured, automation-friendly timers, but it creates real friction in the context of Voice.
When a user asks Voice to create a timer, the resulting timer exists only within the Voice subsystem and is not exposed as a Home Assistant entity. This significantly limits its usefulness, as it cannot be referenced by automations, dashboards, scripts, or other integrations.
While timer helpers can be used as a workaround, Voice provides no native abstraction for managing them. Users must pre-create helper entities and implement custom allocation, tracking, and cleanup logic through scripts and automations. This effectively requires users to build their own timer management layer on top of Home Assistant.
This approach introduces unnecessary complexity, limits portability of configurations, and places the burden of timer lifecycle management on users rather than the platform. The prevalence of these workarounds highlights the need for a first-class timer architecture that integrates naturally with Home Assistant's entity model.
The natural response to this problem is to introduce a new domain to handle Voice timers. But introducing a second timer domain alongside the existing helper timer would be architecturally inconsistent — there should be one place in Home Assistant where timers live, not two. This proposal defines what that single domain looks like.
Proposal: current
timerdomain with two entity types1. Single-item timer
This is the current helper timer, migrated into the new domain. Behaviour, services, and attributes remain identical. Existing automations, scripts, and dashboards continue to work without modification.
2. Multi-item timer
Modeled after the
todoentity, a multi-item timer entity holds an arbitrary number of concurrent timer items inside a single entity. This is the type designed for Voice.Fields per item:
name— human label set at creation time ("pasta", "cake")duration— how long the timer runsstarted_at— timestamp when the timer was startedstatus— active / paused / ringing / finishedWhen a Voice intent fires ("set a 5-minute pasta timer"), it adds a new item to the multi-item timer entity rather than creating a new entity. When the timer finishes or the user cancels it, the item is removed.
Why a single domain matters
Without a dedicated
timerdomain, solving the Voice problem would require either extending helpers further (the wrong abstraction) or introducing a parallel timer domain alongside the existing one. Both options lead to fragmentation: two different places where timers live, two different service interfaces, and user-facing confusion about which type to use and when.A single
timerdomain avoids this. It is the one place in Home Assistant where all timer functionality lives, regardless of whether a timer was created manually by a user or dynamically by Voice.This is consistent with how
todoworks: rather than having shopping lists as helpers and a separate domain for calendar-backed to-do lists, everything lives undertodowith a shared model.Why the multi-item model fits HA's architecture
Backwards compatibility
Existing helper timers are migrated into the new
timerdomain as single-item entities. Entity IDs, services, attributes, and behaviour remain unchanged. No automations, scripts, or dashboards require modification. The migration is transparent to the user.Q&A
-- Yes, there should be a mlti-item timer entity per device/satellite.
-- Likely
timer.start_item,timer.cancel_item,timer.pause_item,timer.get_items— mirroring the To-do service pattern.-- It should persist archived, like to-do list items
-- I would hope its silent, but that’s a technical issue. Repair is not dramatic.
-- A dedicated automation trigger that fires whenever one of the timer items changes state
-- A websocket command that subscribes to timer state changes in a multi-item timer
Beta Was this translation helpful? Give feedback.
All reactions