Reinstate greeting as an auto-reply used only when Assist is off

The greeting option returns, but it is now sent as an automatic reply to
incoming messages only when "Route incoming messages to Assist" is disabled,
so senders get an acknowledgement instead of silence. When Assist handles
messages the greeting is not used. Blank disables it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
claude
2026-07-22 19:43:36 +03:00
parent 47ac2ac487
commit c3b98043f7
8 changed files with 22 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ from .const import (
CONF_ASSIST_LANGUAGE,
CONF_DISPLAY_NAME,
CONF_ENABLE_ASSIST,
CONF_GREETING,
CONF_INTERFACE_NAME,
CONF_LOGLEVEL,
CONF_PROPAGATION_NODE,
@@ -235,7 +236,12 @@ def _make_incoming_handler(
_LOGGER.debug("Ignoring message from non-allowed sender %s", source)
return
# When messages are NOT routed to Assist, optionally auto-reply with the
# greeting so senders get an acknowledgement instead of silence.
if not options.get(CONF_ENABLE_ASSIST, True):
greeting = (options.get(CONF_GREETING) or "").strip()
if greeting:
await _reply(runtime.manager, source, greeting, "Home Assistant")
return
text = (payload.get("content") or "").strip()