Skip to content

Show time since last change on dashboard widgets - #34

Merged
iTerminate merged 3 commits into
mainfrom
show-last-changed
Aug 7, 2026
Merged

Show time since last change on dashboard widgets#34
iTerminate merged 3 commits into
mainfrom
show-last-changed

Conversation

@iTerminate

Copy link
Copy Markdown
Owner

Summary

  • Add an opt-in per-slot dashboard widget option, show_last_changed, that shows a self-refreshing "Nm ago" line under a widget's state
  • Available on every single-entity widget (sensor, binary_sensor, switch, light, fan, lock, cover, thermostat, media_player, weather, gauge); excluded from graph (already time-based) and panel/split (multi-entity)
  • Toggled via a checkbox in the slot assignment popup, with live preview and prefill on reopen
  • Persisted as a new show_last_changed column on dashboard_slots, migrated for existing DBs
  • Demo dashboards seed a few examples (Front Door sensor, blinds, lock) with backdated timestamps

Closes #33

Test plan

  • uv run pytest — full suite (1241 tests) passes
  • uv run pyright — clean
  • uv run ruff check . — clean
  • Manually verified in uv run hatty --demo: Front Door widget on the Home dashboard shows "🚪 Closed / 4h ago"; the popup checkbox appears for a sensor slot and hides for graph/panel; reopening a slot with the flag set shows it pre-checked

@iTerminate
iTerminate merged commit 3132920 into main Aug 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard widget option: show time since last change

1 participant