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

@@ -105,6 +105,9 @@ will answer.
will answer. will answer.
- **Default recipient** address the `notify.reticulum_send_message` entity - **Default recipient** address the `notify.reticulum_send_message` entity
sends to (see Entities below). sends to (see Entities below).
- **Greeting / auto-reply** message sent automatically in reply to incoming
messages **only when "Route incoming messages to Assist" is off** (so senders
get an acknowledgement instead of silence). Blank = disabled.
- **Default delivery method** `direct`, `opportunistic`, or `propagated`. - **Default delivery method** `direct`, `opportunistic`, or `propagated`.
- **Announce interval** periodic re-announce (seconds; `0` disables). - **Announce interval** periodic re-announce (seconds; `0` disables).
- **Propagation node** + **sync interval** optional store-and-forward node so - **Propagation node** + **sync interval** optional store-and-forward node so

View File

@@ -34,6 +34,7 @@ from .const import (
CONF_ASSIST_LANGUAGE, CONF_ASSIST_LANGUAGE,
CONF_DISPLAY_NAME, CONF_DISPLAY_NAME,
CONF_ENABLE_ASSIST, CONF_ENABLE_ASSIST,
CONF_GREETING,
CONF_INTERFACE_NAME, CONF_INTERFACE_NAME,
CONF_LOGLEVEL, CONF_LOGLEVEL,
CONF_PROPAGATION_NODE, CONF_PROPAGATION_NODE,
@@ -235,7 +236,12 @@ def _make_incoming_handler(
_LOGGER.debug("Ignoring message from non-allowed sender %s", source) _LOGGER.debug("Ignoring message from non-allowed sender %s", source)
return 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): 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 return
text = (payload.get("content") or "").strip() text = (payload.get("content") or "").strip()

View File

@@ -41,6 +41,7 @@ from .const import (
CONF_DELIVERY_METHOD, CONF_DELIVERY_METHOD,
CONF_DISPLAY_NAME, CONF_DISPLAY_NAME,
CONF_ENABLE_ASSIST, CONF_ENABLE_ASSIST,
CONF_GREETING,
CONF_INTERFACE_NAME, CONF_INTERFACE_NAME,
CONF_LOGLEVEL, CONF_LOGLEVEL,
CONF_PROPAGATION_NODE, CONF_PROPAGATION_NODE,
@@ -194,6 +195,10 @@ class ReticulumOptionsFlow(OptionsFlow):
"suggested_value": opts.get(CONF_DEFAULT_RECIPIENT, "") "suggested_value": opts.get(CONF_DEFAULT_RECIPIENT, "")
}, },
): TextSelector(), ): TextSelector(),
vol.Optional(
CONF_GREETING,
description={"suggested_value": opts.get(CONF_GREETING, "")},
): TextSelector(TextSelectorConfig(multiline=True)),
vol.Required( vol.Required(
CONF_DELIVERY_METHOD, CONF_DELIVERY_METHOD,
default=opts.get(CONF_DELIVERY_METHOD, DEFAULT_DELIVERY_METHOD), default=opts.get(CONF_DELIVERY_METHOD, DEFAULT_DELIVERY_METHOD),

View File

@@ -27,6 +27,7 @@ CONF_SYNC_INTERVAL: Final = "sync_interval"
CONF_DELIVERY_METHOD: Final = "delivery_method" CONF_DELIVERY_METHOD: Final = "delivery_method"
CONF_STAMP_COST: Final = "stamp_cost" CONF_STAMP_COST: Final = "stamp_cost"
CONF_LOGLEVEL: Final = "loglevel" CONF_LOGLEVEL: Final = "loglevel"
CONF_GREETING: Final = "greeting"
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Defaults # Defaults

View File

@@ -12,5 +12,5 @@
"loggers": ["RNS", "LXMF"], "loggers": ["RNS", "LXMF"],
"requirements": ["rns>=0.9.0", "lxmf>=0.6.0"], "requirements": ["rns>=0.9.0", "lxmf>=0.6.0"],
"single_config_entry": true, "single_config_entry": true,
"version": "1.0.7" "version": "1.0.8"
} }

View File

@@ -37,6 +37,7 @@
"allow_all_senders": "Reply to any sender", "allow_all_senders": "Reply to any sender",
"allowed_identities": "Allowed sender addresses", "allowed_identities": "Allowed sender addresses",
"default_recipient": "Default recipient address (for the notify entity)", "default_recipient": "Default recipient address (for the notify entity)",
"greeting": "Auto-reply message (when Assist is off)",
"delivery_method": "Default delivery method", "delivery_method": "Default delivery method",
"announce_interval": "Announce interval", "announce_interval": "Announce interval",
"propagation_node": "Propagation node address", "propagation_node": "Propagation node address",
@@ -47,6 +48,7 @@
"enable_assist": "When enabled, incoming LXMF messages are answered by the Assist conversation agent and the reply is sent back over Reticulum.", "enable_assist": "When enabled, incoming LXMF messages are answered by the Assist conversation agent and the reply is sent back over Reticulum.",
"allowed_identities": "One address per line (or comma separated). Only used when 'Reply to any sender' is off.", "allowed_identities": "One address per line (or comma separated). Only used when 'Reply to any sender' is off.",
"default_recipient": "16-byte hex LXMF address that the notify.reticulum entity sends to.", "default_recipient": "16-byte hex LXMF address that the notify.reticulum entity sends to.",
"greeting": "Sent as an automatic reply to incoming messages only when 'Route incoming messages to Assist' is turned off. Leave blank to disable.",
"announce_interval": "How often (seconds) to announce our address. 0 disables periodic announces.", "announce_interval": "How often (seconds) to announce our address. 0 disables periodic announces.",
"propagation_node": "Optional LXMF propagation node for store-and-forward delivery.", "propagation_node": "Optional LXMF propagation node for store-and-forward delivery.",
"sync_interval": "How often (seconds) to pull queued messages from the propagation node. 0 disables." "sync_interval": "How often (seconds) to pull queued messages from the propagation node. 0 disables."

View File

@@ -37,6 +37,7 @@
"allow_all_senders": "Reply to any sender", "allow_all_senders": "Reply to any sender",
"allowed_identities": "Allowed sender addresses", "allowed_identities": "Allowed sender addresses",
"default_recipient": "Default recipient address (for the notify entity)", "default_recipient": "Default recipient address (for the notify entity)",
"greeting": "Auto-reply message (when Assist is off)",
"delivery_method": "Default delivery method", "delivery_method": "Default delivery method",
"announce_interval": "Announce interval", "announce_interval": "Announce interval",
"propagation_node": "Propagation node address", "propagation_node": "Propagation node address",
@@ -47,6 +48,7 @@
"enable_assist": "When enabled, incoming LXMF messages are answered by the Assist conversation agent and the reply is sent back over Reticulum.", "enable_assist": "When enabled, incoming LXMF messages are answered by the Assist conversation agent and the reply is sent back over Reticulum.",
"allowed_identities": "One address per line (or comma separated). Only used when 'Reply to any sender' is off.", "allowed_identities": "One address per line (or comma separated). Only used when 'Reply to any sender' is off.",
"default_recipient": "16-byte hex LXMF address that the notify.reticulum entity sends to.", "default_recipient": "16-byte hex LXMF address that the notify.reticulum entity sends to.",
"greeting": "Sent as an automatic reply to incoming messages only when 'Route incoming messages to Assist' is turned off. Leave blank to disable.",
"announce_interval": "How often (seconds) to announce our address. 0 disables periodic announces.", "announce_interval": "How often (seconds) to announce our address. 0 disables periodic announces.",
"propagation_node": "Optional LXMF propagation node for store-and-forward delivery.", "propagation_node": "Optional LXMF propagation node for store-and-forward delivery.",
"sync_interval": "How often (seconds) to pull queued messages from the propagation node. 0 disables." "sync_interval": "How often (seconds) to pull queued messages from the propagation node. 0 disables."

View File

@@ -37,6 +37,7 @@
"allow_all_senders": "Отвечать любому отправителю", "allow_all_senders": "Отвечать любому отправителю",
"allowed_identities": "Разрешённые адреса отправителей", "allowed_identities": "Разрешённые адреса отправителей",
"default_recipient": "Адрес получателя по умолчанию (для сущности notify)", "default_recipient": "Адрес получателя по умолчанию (для сущности notify)",
"greeting": "Автоответ (когда Assist выключен)",
"delivery_method": "Способ доставки по умолчанию", "delivery_method": "Способ доставки по умолчанию",
"announce_interval": "Интервал анонсов", "announce_interval": "Интервал анонсов",
"propagation_node": "Адрес узла ретрансляции (propagation node)", "propagation_node": "Адрес узла ретрансляции (propagation node)",
@@ -47,6 +48,7 @@
"enable_assist": "Если включено, входящие сообщения LXMF обрабатываются агентом Assist, а ответ отправляется обратно через Reticulum.", "enable_assist": "Если включено, входящие сообщения LXMF обрабатываются агентом Assist, а ответ отправляется обратно через Reticulum.",
"allowed_identities": "По одному адресу в строке (или через запятую). Используется только если «Отвечать любому отправителю» выключено.", "allowed_identities": "По одному адресу в строке (или через запятую). Используется только если «Отвечать любому отправителю» выключено.",
"default_recipient": "16-байтовый hex-адрес LXMF, на который отправляет сущность notify.reticulum.", "default_recipient": "16-байтовый hex-адрес LXMF, на который отправляет сущность notify.reticulum.",
"greeting": "Отправляется автоматически в ответ на входящие сообщения только когда «Направлять входящие сообщения в Assist» выключено. Оставьте пустым, чтобы отключить.",
"announce_interval": "Как часто (в секундах) анонсировать наш адрес. 0 отключает периодические анонсы.", "announce_interval": "Как часто (в секундах) анонсировать наш адрес. 0 отключает периодические анонсы.",
"propagation_node": "Необязательный узел ретрансляции LXMF для доставки по принципу store-and-forward.", "propagation_node": "Необязательный узел ретрансляции LXMF для доставки по принципу store-and-forward.",
"sync_interval": "Как часто (в секундах) забирать сообщения из очереди узла ретрансляции. 0 отключает." "sync_interval": "Как часто (в секундах) забирать сообщения из очереди узла ретрансляции. 0 отключает."