-
Notifications
You must be signed in to change notification settings - Fork 4
Add Helper CRUD API (input_boolean, counter, timer, etc.) #440
Copy link
Copy link
Open
Labels
area:apiHA REST/WebSocket APIHA REST/WebSocket APIenhancementNew feature or requestNew feature or requestsize:largeSignificant effortSignificant effort
Description
Description
No typed wrappers exist for HA helper management WebSocket commands. Users who want their apps to programmatically create helpers (e.g., an app that bootstraps its own input_boolean for state tracking) must use raw ws_send_and_wait() with untyped responses.
Helpers created via these WS commands persist across HA restarts (stored in .storage/), making them suitable for apps that self-provision their own state without requiring manual HA setup.
HA WebSocket pattern: Each helper domain registers five commands via DictStorageCollectionWebsocket:
{domain}/list{domain}/create{domain}/update{domain}/delete{domain}/subscribe
Domains to cover: input_boolean, input_number, input_text, input_select, input_datetime, input_button, counter, timer
Use Cases
- App that creates its own
input_booleantoggle (e.g., vacation mode, guest mode) - App that bootstraps a
counterfor tracking cycles (e.g., air filter replacement) - App that creates an
input_selectfor user-facing mode selection - Self-contained apps that don't require users to manually create helpers in HA before installing
Acceptance Criteria
- Add typed methods for
list,create,update,deleteper helper domain - Pydantic response models for each helper type
- Convenience method that creates-if-not-exists (idempotent bootstrap)
- Tests cover all new API 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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:apiHA REST/WebSocket APIHA REST/WebSocket APIenhancementNew feature or requestNew feature or requestsize:largeSignificant effortSignificant effort
Projects
Status
Refinement