Remove the greeting feature entirely

Drops the CONF_GREETING option, the first-contact greeting logic and its
RuntimeData state, and all related strings/translations/README text. Any
greeting value left in an existing entry's options is simply ignored.

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

View File

@@ -105,8 +105,6 @@ 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** optional message sent automatically the first time each sender
contacts Home Assistant (once per sender, reset on restart). 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,7 +34,6 @@ 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,
@@ -80,8 +79,6 @@ class RuntimeData:
# Maps a peer address -> the HA conversation_id we opened for it, so # Maps a peer address -> the HA conversation_id we opened for it, so
# each remote user keeps its own Assist conversation context. # each remote user keeps its own Assist conversation context.
self.conversation_ids: dict[str, str] = {} self.conversation_ids: dict[str, str] = {}
# Senders we've already greeted this session (first-contact greeting).
self.greeted: set[str] = set()
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
@@ -238,12 +235,6 @@ 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
# First-contact greeting: send the configured greeting once per sender.
greeting = (options.get(CONF_GREETING) or "").strip()
if greeting and source not in runtime.greeted:
runtime.greeted.add(source)
await _reply(runtime.manager, source, greeting, "Home Assistant")
if not options.get(CONF_ENABLE_ASSIST, True): if not options.get(CONF_ENABLE_ASSIST, True):
return return

View File

@@ -41,7 +41,6 @@ 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,
@@ -195,10 +194,6 @@ 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,7 +27,6 @@ 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.6" "version": "1.0.7"
} }

View File

@@ -37,7 +37,6 @@
"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": "First-contact greeting message",
"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",
@@ -48,7 +47,6 @@
"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 automatically the first time each sender messages Home Assistant (once per sender per restart). 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,7 +37,6 @@
"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": "First-contact greeting message",
"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",
@@ -48,7 +47,6 @@
"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 automatically the first time each sender messages Home Assistant (once per sender per restart). 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,7 +37,6 @@
"allow_all_senders": "Отвечать любому отправителю", "allow_all_senders": "Отвечать любому отправителю",
"allowed_identities": "Разрешённые адреса отправителей", "allowed_identities": "Разрешённые адреса отправителей",
"default_recipient": "Адрес получателя по умолчанию (для сущности notify)", "default_recipient": "Адрес получателя по умолчанию (для сущности notify)",
"greeting": "Приветствие при первом обращении",
"delivery_method": "Способ доставки по умолчанию", "delivery_method": "Способ доставки по умолчанию",
"announce_interval": "Интервал анонсов", "announce_interval": "Интервал анонсов",
"propagation_node": "Адрес узла ретрансляции (propagation node)", "propagation_node": "Адрес узла ретрансляции (propagation node)",
@@ -48,7 +47,6 @@
"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": "Отправляется автоматически при первом сообщении от каждого отправителя (один раз на отправителя до перезапуска). Оставьте пустым, чтобы отключить.",
"announce_interval": "Как часто (в секундах) анонсировать наш адрес. 0 отключает периодические анонсы.", "announce_interval": "Как часто (в секундах) анонсировать наш адрес. 0 отключает периодические анонсы.",
"propagation_node": "Необязательный узел ретрансляции LXMF для доставки по принципу store-and-forward.", "propagation_node": "Необязательный узел ретрансляции LXMF для доставки по принципу store-and-forward.",
"sync_interval": "Как часто (в секундах) забирать сообщения из очереди узла ретрансляции. 0 отключает." "sync_interval": "Как часто (в секундах) забирать сообщения из очереди узла ретрансляции. 0 отключает."