Files
core/tests
Michael HansenandClaude Opus 5 5045dd33ce Address review feedback on timer lists
Behaviour fixes:

- Subtracting all remaining time from a *paused* timer now finishes it,
  like the active case already did, instead of leaving it paused at zero.
- A zero duration passed to add_time/subtract_time is a no-op. The
  service schema accepts it, so a direct call used to reschedule the
  timer and emit TIME_CHANGED with a delta of 0.
- _archive now cancels the pending finish callback itself, so every
  terminal path clears it rather than each caller remembering to.

Timer intents now check supported_features. A list may advertise only
some of TimerListEntityFeature, but every intent called its entity
method directly, so an unsupported action surfaced as NotImplementedError
instead of the "device does not support timers" response. Tool exposure
matches: HassCancelAllTimers moves out of the always-on LLM_INTENTS,
since it resolves the requesting device's own list and could only ever
fail without one, and each timer tool is now offered only if the
device's list supports it.

Timer list triggers no longer miss a list created after the automation.
Entity registry creation fires before EntityPlatform hands the entity to
the component, so the synchronous lookup found nothing and never retried;
wait for the entity's first state write and resolve then.

ESPHome only marks the timer_list platform as needed when the device
advertises the TIMERS feature, matching what timer_list.async_setup_entry
will actually create.

Docstring corrections: `timers` said archived timers are what voice
status reports, but _find_timers filters to active and paused; add_time
promised finishing on subtract-to-zero without qualifying that it now
holds for paused timers too, and said nothing about a zero duration.

Also drops a conditional from a parametrized test body, per the
repository test conventions.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-02 17:21:59 -05:00
..
…
…
…
2026-09-01 14:52:06 -05:00
…
…
…