feat: Add notification automation blueprint for due tasks#67
Conversation
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
…tification-automations' into copilot/feat-create-blueprint-notification-automations
|
@copilot The blueprint is not offered when creating an automation. |
…ear in the HA UI Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Fixed in the latest commit. Simply placing the YAML file in the integration directory is not enough — HA doesn't scan custom component directories for blueprints automatically. I've added a |
…lueprints directory Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a bundled Home Assistant automation blueprint intended to notify users about due Task Tracker tasks, plus integration-side logic to make the blueprint available when the component loads.
Changes:
- Added a new automation blueprint YAML for “notify due tasks”.
- Updated the integration setup to register the bundled blueprint at runtime.
- Updated README option documentation and adjusted manifest dependencies.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| README.md | Updates option documentation (Active Override now includes binary_sensor). |
| manifest.json | Adds a dependency entry related to blueprint support. |
| blueprints/task_tracker_notify.yaml | Introduces a reusable automation blueprint for due-task notifications. |
| init.py | Registers the packaged blueprint during integration setup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| cards = TaskTrackerCardRegistration(hass) | ||
| await cards.async_register(show_panel=show_panel) | ||
|
|
||
| await _async_register_blueprints(hass) | ||
|
|
There was a problem hiding this comment.
@copilot Please move the imports from _async_register_blueprints(hass: HomeAssistant) to the top and instead add unit test coverage for the function.
There was a problem hiding this comment.
Done in b5a55d6. I moved the _async_register_blueprints imports to module top-level and added unit test coverage for _async_register_blueprints success and failure paths in tests/unit_tests/test_init.py.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Adds a reusable Home Assistant automation blueprint that notifies users about due tasks. Blueprints placed under
blueprints/automation/<domain>/are automatically registered by HA when the custom component is loaded.Changes
blueprints/automation/task_tracker/notify_due_tasks.yaml— new blueprint wrapping the reference automation, with three configurable inputs:notification_time08:00:00notify_actionnotify.mobile_app_my_phone)user_taguser_tagtagsattributeThe core filtering logic is preserved from the reference automation — only tasks where
overdue_by % notification_interval == 0produce a notification, avoiding repeated daily alerts for the same task.