Add Home Assistant community ability#184
Open
harmsolo13 wants to merge 4 commits intoopenhome-dev:devfrom
Open
Add Home Assistant community ability#184harmsolo13 wants to merge 4 commits intoopenhome-dev:devfrom
harmsolo13 wants to merge 4 commits intoopenhome-dev:devfrom
Conversation
Contributor
✅ Community PR Path Check — PassedAll changed files are inside the |
Contributor
🔀 Branch Merge CheckPR direction: ✅ Passed — |
Contributor
🔍 Lint Results✅
|
Contributor
✅ Ability Validation Passed |
- Replace manual register_capability() with # {{register_capability}} tag
- Remove .env file loading that used blocked open()
- Fix F541 f-string without placeholders
- Rename ambiguous variable 'l' to 'p' (E741)
- Remove hardcoded IP from HA_URL default
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Please share your demo if you can. |
Contributor
Author
|
Demo link added to the readme |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🆕 New Community Ability
Ability Name:
community/home-assistant-voice-controlWhat does it do?
Voice-controlled interface for Home Assistant via REST API. Control lights, switches, covers, sensors, sirens, media players, and shopping lists — all hands-free. Uses LLM-based intent classification with fuzzy entity name matching so users can say natural phrases like "turn off the kitchen light" or "add milk to my shopping list" without knowing exact entity IDs.
Key features:
light.camera_1_floodlight)Demo
🎬 Watch the demo video on Loom
Suggested Trigger Words
Example conversation
User: "Smart home"
OpenHome: "Home Assistant connected. I found 24 devices across 5 categories. What would you like to do?"
User: "Turn on the floodlight"
OpenHome: "Turning on Camera 1 Floodlight."
User: "Is there motion at the front door?"
OpenHome: "No motion detected at the front door."
User: "Open the gate"
OpenHome: "Are you sure you want to open the gate?"
User: "Yes"
OpenHome: "Opening the driveway gate."
User: "Add cat food to the shopping list"
OpenHome: "Added cat food to your shopping list."
User: "Done"
OpenHome: "Home Assistant control ended. Have a good one."
APIs Required
http://YOUR_HA_IP:8123/profile→ Long-Lived Access Tokens. Free, no rate limits for local instances. Set viaHA_TOKENin.envfile alongsidemain.py.Type
Checklist
main.pyextendsMatchingCapabilitywithregister_capabilityREADME.mdexists with description + setup instructionscommunity/home-assistant-voice-control/resume_normal_flow()called on every exit path (infinallyblock)print()— usingeditor_logging_handlerredis,connection_manager,user_config)asyncio.sleep()orasyncio.create_task()— usingsession_tasksAnything else?
LLM Intent Classification: Uses the platform's built-in
text_to_text_responsewith a structured system prompt. Returns JSON with action, entity_id, service_data, and a natural spoken response. Handles markdown code fences in LLM output gracefully.Safety confirmations: Actions like
open_cover,close_cover,activate_siren, anddeactivate_sirenrequire voice confirmation viarun_confirmation_loop()before execution.Entity registry: Builds a compact entity list from HA's
/api/statesendpoint, filtered to actionable domains only (light,switch,cover,media_player,siren,binary_sensor,sensor,todo). This keeps LLM context focused and fast.