Hi everyone ![]()
I wanted a way for Home Assistant to make my Echo devices proactively ask a question — "You're turning off the TV and the shutters are still open, should I close them?" — and then answer with a simple "yes" / "no" (or free speech), with the reply handled by my own HA automations through Assist.
The native Alexa smart-home integration can't do that: it only understands Amazon's fixed grammar, and it can't ask + listen. So I built a tiny custom Alexa skill that bridges the two. It's basically Alexa Actionable Notifications, but on top of Assist — open, unlimited number of answers, and 100 % driven by conversation-triggered automations.
What it can do
HA-initiated questions — an automation makes an Echo speak a question and keep the mic open.
Yes / No answers routed into conversation.process→ any automation with aconversationtrigger reacts.
Custom intents / free speech — say anything after opening the skill, it goes straight to Assist.
Whisper mode — questions can be whispered (<amazon:effect name="whispered">) for discreet late-night prompts.
How it works
Home Assistant Alexa
────────────── ─────
script.poser_question_alexa
├─ writes the question (JSON) to
│ input_text.assist_alexa_question
└─ toggles input_boolean.declencher_... (exposed to Alexa)
│
▼ (Alexa Routine)
"open my assistant" ──► Skill LaunchRequest
├─ reads the question from HA
├─ speaks it (optionally whispered)
└─ keeps the mic open
conversation.process ◄── you say "yes" / "no" / …
(your conversation-trigger automation runs and answers)
Because Amazon won't let HA make an Echo ask + listen on its own, an Alexa Routine (trigger = the exposed input_boolean, action = Custom → "open my assistant") launches the skill when HA raises the flag. HA clears the pending question after ~25 s, so the skill only makes one fast call.
Setup (full details in the README)
- Home Assistant — an
input_texthelper (the pending question), aninput_boolean(the trigger, exposed to Alexa), onescriptthat fills them, and oneconversation-triggered automation per answer. - Alexa Developer Console — create an Alexa-hosted (Python) Custom skill, paste the interaction model + the skill code, set your
HA_URLand a long-lived token. - Alexa app — a Routine that opens the skill when the
input_booleanturns on.
The repo ships the skill code, the interaction model, and ready-to-use HA examples (helpers + script + a full "TV off → close the shutters?" flow).
Language note
The interaction model and the spoken strings are in French (that's my setup). For any other language, just adapt:
skill-package/interactionModels/custom/fr-FR.json→ your locale + invocation name + intent samples (rename the file, e.g.en-US.json).- The response strings inside
lambda/lambda_function.py("J'écoute.","Désolé…", etc.). HA_LANG = "fr"→ your Assist language.- The example
conversationcommands ("ferme les volets"→"close the shutters").
Everything else (the flow, the helpers, the Routine) is language-agnostic.
Dev gotcha that cost me hours
In the ASK SDK, your handler parameter MUST be named handler_input (and the exception handler (handler_input, exception)). The framework calls handlers by keyword, so def can_handle(self, h) raises TypeError → the skill returns an invalid response and Alexa just says "there was a problem with the requested skill" with no useful log. Renaming the parameter fixed it instantly.
Feedback and PRs welcome. Hope it helps someone who — like me — wanted their house to ask instead of just obey ![]()