-
Notifications
You must be signed in to change notification settings - Fork 4
Add convenience wrappers for todo, calendar, and automation control #441
Description
Description
Several HA operations are technically possible via hassette's existing call_service() and REST methods, but lack typed convenience wrappers. Adding thin typed APIs for these would improve DX for common automation patterns.
Todo CRUD
Currently requires raw call_service('todo', 'add_item', ...). A typed wrapper would make task-management automations cleaner.
Use cases:
- Add "replace air filter" to a maintenance list when a counter threshold is hit
- Create a grocery item when a pantry sensor trips
- Mark items complete when an automation confirms the task was done
Services to wrap: todo.add_item, todo.update_item, todo.remove_item, todo.get_items
WS-only: todo/item/list (for richer filtering), todo/item/move (reordering)
Calendar Event Read
Hassette already has get_calendar_events() via REST. This may just need better discoverability or typed response models if not already covered.
Use cases:
- Don't run the vacuum if there's a meeting on the calendar
- Pre-heat the house 30 min before an "arrive home" calendar event
- Schedule-aware lighting scenes
Automation Enable/Disable
Currently requires call_service('automation', 'turn_on'/'turn_off', ...). A typed method makes meta-automation patterns more readable.
Use cases:
- Disable motion-light automation when movie mode is on
- Enable security automations when everyone leaves
- Seasonal automation toggling (e.g., holiday lighting schedules)
Services to wrap: automation.turn_on, automation.turn_off, automation.toggle, automation.trigger
Acceptance Criteria
- Typed methods for todo CRUD (
add_todo_item,update_todo_item,remove_todo_item,get_todo_items) - Typed response models for todo items
- Typed methods for automation enable/disable (
enable_automation,disable_automation,toggle_automation) - Verify calendar event API coverage and add typed models if missing
- Tests for all new methods
References
- Identified during MCP gap analysis comparing hassette API surface to HA MCP server capabilities
- Related: Add registry APIs for devices, entities, and areas #285 (registry APIs), Add statistics API support #286 (statistics API), Add Helper CRUD API (input_boolean, counter, timer, etc.) #440 (helper CRUD)
Metadata
Metadata
Assignees
Labels
Projects
Status