Count sent messages at send time; implement first-contact greeting

- messages_sent now increments when a message is queued (async_send_message),
  not only when a delivery proof returns. LXMessage's delivery callback only
  fires on a returned proof (LXMessage.py ~566), which many peers/methods never
  send, so the "Messages sent" sensor was stuck at 0 for messages that were
  actually delivered. The delivery callback now only emits the event.
- Implement the previously-inert "greeting" option: send it automatically the
  first time each sender contacts HA (tracked per sender in RuntimeData).
- Clarify the notify entity (rename to "Send message" / "Отправить сообщение")
  and document greeting + notify in strings/translations/README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
claude
2026-07-22 19:28:26 +03:00
parent 3be19028b1
commit 9ae6bb09c4
7 changed files with 32 additions and 12 deletions

View File

@@ -37,7 +37,7 @@
"allow_all_senders": "Reply to any sender",
"allowed_identities": "Allowed sender addresses",
"default_recipient": "Default recipient address (for the notify entity)",
"greeting": "Greeting message",
"greeting": "First-contact greeting message",
"delivery_method": "Default delivery method",
"announce_interval": "Announce interval",
"propagation_node": "Propagation node address",
@@ -48,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.",
"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."
@@ -79,7 +80,7 @@
"sync": { "name": "Sync propagation node" }
},
"notify": {
"message": { "name": "Message" }
"message": { "name": "Send message" }
}
},
"selector": {

View File

@@ -37,7 +37,7 @@
"allow_all_senders": "Отвечать любому отправителю",
"allowed_identities": "Разрешённые адреса отправителей",
"default_recipient": "Адрес получателя по умолчанию (для сущности notify)",
"greeting": "Приветственное сообщение",
"greeting": "Приветствие при первом обращении",
"delivery_method": "Способ доставки по умолчанию",
"announce_interval": "Интервал анонсов",
"propagation_node": "Адрес узла ретрансляции (propagation node)",
@@ -48,6 +48,7 @@
"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 отключает."
@@ -79,7 +80,7 @@
"sync": { "name": "Синхронизировать узел ретрансляции" }
},
"notify": {
"message": { "name": "Сообщение" }
"message": { "name": "Отправить сообщение" }
}
},
"selector": {