Hi everyone ![]()
I’m trying to get a consistent “safe” behavior from my voice assistant in Home Assistant and would love to know if there’s a built-in or recommended way to do this.
What I want (for any entity):
When I say things like:
- “Turn on the boiler”
- “Turn off the living room light”
- “Turn on the bedroom AC”
I want HA / the voice assistant to:
- Check the current state first.
- If the entity is already in the requested state:
-
Do not change anything yet.
-
Respond with something like:
- “The boiler is already on, do you still want to turn it on/change it?”
-
Wait for an explicit yes/no.
-
Only if I confirm → perform the action.
- If it’s not in the requested state:
- Just run turn_on / turn_off normally and confirm.
Goal: avoid blindly toggling things that are already on/off (boiler, AC, doors, etc).
Context:
- I’m currently using Gemini as my AI agent.
- I know this can be “prompt engineered” (HassGetState before HassTurnOn/Off), but in reality the LLM doesn’t always follow the rules, so it’s not reliable as a safety layer.
What I’m looking for:
-
Is there any simple / built-in / officially recommended pattern for this?
- For example using Assist, assist_satellite.ask_question, sentence triggers, or a specific agent setup.
-
Any community-proven examples (GitHub / blueprints / intent_script) of:
- A single guarded on/off intent/script
- That checks state, asks for confirmation if already matching, and only then executes.
If you have links to working examples or best practices (with Gemini or with Assist-only), I’d really appreciate it. ![]()