From 47ac2ac4872a0ef40a115d27253d9cd94c588b5f Mon Sep 17 00:00:00 2001 From: claude Date: Wed, 22 Jul 2026 19:38:36 +0300 Subject: [PATCH] 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 --- README.md | 2 -- custom_components/reticulum/__init__.py | 9 --------- custom_components/reticulum/config_flow.py | 5 ----- custom_components/reticulum/const.py | 1 - custom_components/reticulum/manifest.json | 2 +- custom_components/reticulum/strings.json | 2 -- custom_components/reticulum/translations/en.json | 2 -- custom_components/reticulum/translations/ru.json | 2 -- 8 files changed, 1 insertion(+), 24 deletions(-) diff --git a/README.md b/README.md index 9b4ec7b..f366b9e 100644 --- a/README.md +++ b/README.md @@ -105,8 +105,6 @@ will answer. will answer. - **Default recipient** – address the `notify.reticulum_send_message` entity 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`. - **Announce interval** – periodic re-announce (seconds; `0` disables). - **Propagation node** + **sync interval** – optional store-and-forward node so diff --git a/custom_components/reticulum/__init__.py b/custom_components/reticulum/__init__.py index 8d2f606..4c7a331 100644 --- a/custom_components/reticulum/__init__.py +++ b/custom_components/reticulum/__init__.py @@ -34,7 +34,6 @@ from .const import ( CONF_ASSIST_LANGUAGE, CONF_DISPLAY_NAME, CONF_ENABLE_ASSIST, - CONF_GREETING, CONF_INTERFACE_NAME, CONF_LOGLEVEL, CONF_PROPAGATION_NODE, @@ -80,8 +79,6 @@ class RuntimeData: # Maps a peer address -> the HA conversation_id we opened for it, so # each remote user keeps its own Assist conversation context. 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: @@ -238,12 +235,6 @@ def _make_incoming_handler( _LOGGER.debug("Ignoring message from non-allowed sender %s", source) 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): return diff --git a/custom_components/reticulum/config_flow.py b/custom_components/reticulum/config_flow.py index 275a036..c42b217 100644 --- a/custom_components/reticulum/config_flow.py +++ b/custom_components/reticulum/config_flow.py @@ -41,7 +41,6 @@ from .const import ( CONF_DELIVERY_METHOD, CONF_DISPLAY_NAME, CONF_ENABLE_ASSIST, - CONF_GREETING, CONF_INTERFACE_NAME, CONF_LOGLEVEL, CONF_PROPAGATION_NODE, @@ -195,10 +194,6 @@ class ReticulumOptionsFlow(OptionsFlow): "suggested_value": opts.get(CONF_DEFAULT_RECIPIENT, "") }, ): TextSelector(), - vol.Optional( - CONF_GREETING, - description={"suggested_value": opts.get(CONF_GREETING, "")}, - ): TextSelector(TextSelectorConfig(multiline=True)), vol.Required( CONF_DELIVERY_METHOD, default=opts.get(CONF_DELIVERY_METHOD, DEFAULT_DELIVERY_METHOD), diff --git a/custom_components/reticulum/const.py b/custom_components/reticulum/const.py index a52dcc3..d907f31 100644 --- a/custom_components/reticulum/const.py +++ b/custom_components/reticulum/const.py @@ -27,7 +27,6 @@ CONF_SYNC_INTERVAL: Final = "sync_interval" CONF_DELIVERY_METHOD: Final = "delivery_method" CONF_STAMP_COST: Final = "stamp_cost" CONF_LOGLEVEL: Final = "loglevel" -CONF_GREETING: Final = "greeting" # --------------------------------------------------------------------------- # Defaults diff --git a/custom_components/reticulum/manifest.json b/custom_components/reticulum/manifest.json index 315f6c7..d291895 100644 --- a/custom_components/reticulum/manifest.json +++ b/custom_components/reticulum/manifest.json @@ -12,5 +12,5 @@ "loggers": ["RNS", "LXMF"], "requirements": ["rns>=0.9.0", "lxmf>=0.6.0"], "single_config_entry": true, - "version": "1.0.6" + "version": "1.0.7" } diff --git a/custom_components/reticulum/strings.json b/custom_components/reticulum/strings.json index 3a3ace4..181b615 100644 --- a/custom_components/reticulum/strings.json +++ b/custom_components/reticulum/strings.json @@ -37,7 +37,6 @@ "allow_all_senders": "Reply to any sender", "allowed_identities": "Allowed sender addresses", "default_recipient": "Default recipient address (for the notify entity)", - "greeting": "First-contact greeting message", "delivery_method": "Default delivery method", "announce_interval": "Announce interval", "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.", "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.", - "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.", "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." diff --git a/custom_components/reticulum/translations/en.json b/custom_components/reticulum/translations/en.json index 3a3ace4..181b615 100644 --- a/custom_components/reticulum/translations/en.json +++ b/custom_components/reticulum/translations/en.json @@ -37,7 +37,6 @@ "allow_all_senders": "Reply to any sender", "allowed_identities": "Allowed sender addresses", "default_recipient": "Default recipient address (for the notify entity)", - "greeting": "First-contact greeting message", "delivery_method": "Default delivery method", "announce_interval": "Announce interval", "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.", "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.", - "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.", "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." diff --git a/custom_components/reticulum/translations/ru.json b/custom_components/reticulum/translations/ru.json index ae6b3e0..aef0faf 100644 --- a/custom_components/reticulum/translations/ru.json +++ b/custom_components/reticulum/translations/ru.json @@ -37,7 +37,6 @@ "allow_all_senders": "Отвечать любому отправителю", "allowed_identities": "Разрешённые адреса отправителей", "default_recipient": "Адрес получателя по умолчанию (для сущности notify)", - "greeting": "Приветствие при первом обращении", "delivery_method": "Способ доставки по умолчанию", "announce_interval": "Интервал анонсов", "propagation_node": "Адрес узла ретрансляции (propagation node)", @@ -48,7 +47,6 @@ "enable_assist": "Если включено, входящие сообщения LXMF обрабатываются агентом Assist, а ответ отправляется обратно через Reticulum.", "allowed_identities": "По одному адресу в строке (или через запятую). Используется только если «Отвечать любому отправителю» выключено.", "default_recipient": "16-байтовый hex-адрес LXMF, на который отправляет сущность notify.reticulum.", - "greeting": "Отправляется автоматически при первом сообщении от каждого отправителя (один раз на отправителя до перезапуска). Оставьте пустым, чтобы отключить.", "announce_interval": "Как часто (в секундах) анонсировать наш адрес. 0 отключает периодические анонсы.", "propagation_node": "Необязательный узел ретрансляции LXMF для доставки по принципу store-and-forward.", "sync_interval": "Как часто (в секундах) забирать сообщения из очереди узла ретрансляции. 0 отключает."