Last active
April 17, 2026 06:31
-
-
Save kai-zer-ru/c8bb0b9edbfab44244a312743178a931 to your computer and use it in GitHub Desktop.
send_delete_message
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| automation: | |
| - alias: "Дача: ответ на текст 'Дача' + автоудаление" | |
| id: dacha_text_report_autodelete | |
| mode: single | |
| triggers: | |
| - trigger: event | |
| event_type: max_notify_received | |
| event_data: | |
| text: "Дача" | |
| actions: | |
| # 1) Отправка сообщения в выбранный чат | |
| - action: max_notify.send_message | |
| target: | |
| entity_id: notify.max_notify_dacha_chat # <-- замени на свою notify-сущность чата | |
| data: | |
| message: "Статус дачи: все системы работают." # <-- замени на свой текст | |
| # title: "Отчет" | |
| # format: "text" | |
| # 2) Подождать 1 секунду | |
| - delay: | |
| seconds: 1 | |
| # 3) Записать ID последнего исходящего в input_text | |
| - action: input_text.set_value | |
| target: | |
| entity_id: input_text.dacha_otchet_soobshchenie_1 | |
| data: | |
| value: "{{ states('sensor.maxnotify_dacha_last_outgoing_message_id') }}" | |
| # ^ замени sensor.* на сенсор "последний исходящий message_id" именно этого чата | |
| # 4) Подождать 20 сек и удалить сообщение | |
| - delay: | |
| seconds: 20 | |
| - action: max_notify.delete_message | |
| target: | |
| entity_id: notify.max_notify_dacha_chat # <-- тот же чат | |
| data: | |
| message_id: "{{ states('input_text.dacha_otchet_soobshchenie_1') }}" | |
| - alias: "Дача: ответ на команду status_1 + автоудаление" | |
| id: dacha_command_status1_autodelete | |
| mode: single | |
| triggers: | |
| - trigger: event | |
| event_type: max_notify_received | |
| event_data: | |
| command: "status_1" | |
| actions: | |
| # 1) Отправка сообщения в выбранный чат | |
| - action: max_notify.send_message | |
| target: | |
| entity_id: notify.max_notify_dacha_chat # <-- замени на свою notify-сущность чата | |
| data: | |
| message: "Статус по кнопке status_1: все в норме." | |
| # title: "Отчет" | |
| # format: "text" | |
| # 2) Подождать 1 секунду | |
| - delay: | |
| seconds: 1 | |
| # 3) Записать ID последнего исходящего в input_text | |
| - action: input_text.set_value | |
| target: | |
| entity_id: input_text.dacha_otchet_soobshchenie_2 | |
| data: | |
| value: "{{ states('sensor.maxnotify_dacha_last_outgoing_message_id') }}" | |
| # ^ замени sensor.* на сенсор "последний исходящий message_id" именно этого чата | |
| # 4) Подождать 20 сек и удалить сообщение | |
| - delay: | |
| seconds: 20 | |
| - action: max_notify.delete_message | |
| target: | |
| entity_id: notify.max_notify_dacha_chat # <-- тот же чат | |
| data: | |
| message_id: "{{ states('input_text.dacha_otchet_soobshchenie_2') }}" | |
| - alias: "Дача: ответ на команду status_2 + автоудаление" | |
| id: dacha_command_status2_autodelete | |
| mode: single | |
| triggers: | |
| - trigger: event | |
| event_type: max_notify_received | |
| event_data: | |
| command: "status_2" | |
| actions: | |
| # 1) Отправка сообщения в выбранный чат | |
| - action: max_notify.send_message | |
| target: | |
| entity_id: notify.max_notify_dacha_chat # <-- замени на свою notify-сущность чата | |
| data: | |
| message: "Статус по кнопке status_2: все в норме." | |
| # title: "Отчет" | |
| # format: "text" | |
| # 2) Подождать 1 секунду | |
| - delay: | |
| seconds: 1 | |
| # 3) Записать ID последнего исходящего в input_text | |
| - action: input_text.set_value | |
| target: | |
| entity_id: input_text.dacha_otchet_soobshchenie_3 | |
| data: | |
| value: "{{ states('sensor.maxnotify_dacha_last_outgoing_message_id') }}" | |
| # ^ замени sensor.* на сенсор "последний исходящий message_id" именно этого чата | |
| # 4) Подождать 20 сек и удалить сообщение | |
| - delay: | |
| seconds: 20 | |
| - action: max_notify.delete_message | |
| target: | |
| entity_id: notify.max_notify_dacha_chat # <-- тот же чат | |
| data: | |
| message_id: "{{ states('input_text.dacha_otchet_soobshchenie_3') }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment