router: add input_text for chat_id, timer expiry notification with buttons
This commit is contained in:
@@ -5,6 +5,11 @@ router:
|
|||||||
duration: '00:10:00'
|
duration: '00:10:00'
|
||||||
name: Connect Accept Timer
|
name: Connect Accept Timer
|
||||||
|
|
||||||
|
input_text:
|
||||||
|
wrt_ca_chat_id:
|
||||||
|
name: "WRT CA Chat ID"
|
||||||
|
icon: mdi:account
|
||||||
|
|
||||||
automation:
|
automation:
|
||||||
|
|
||||||
- alias: ntf|tg|wrt_ip
|
- alias: ntf|tg|wrt_ip
|
||||||
@@ -58,6 +63,11 @@ router:
|
|||||||
event_data:
|
event_data:
|
||||||
command: /wrt_ca_off
|
command: /wrt_ca_off
|
||||||
action:
|
action:
|
||||||
|
- service: input_text.set_value
|
||||||
|
target:
|
||||||
|
entity_id: input_text.wrt_ca_chat_id
|
||||||
|
data:
|
||||||
|
value: "{{ trigger.event.data.chat_id }}"
|
||||||
- service: shell_command.wrt_ca_off
|
- service: shell_command.wrt_ca_off
|
||||||
- service: telegram_bot.send_message
|
- service: telegram_bot.send_message
|
||||||
data:
|
data:
|
||||||
@@ -177,7 +187,7 @@ router:
|
|||||||
- service: telegram_bot.send_message
|
- service: telegram_bot.send_message
|
||||||
data:
|
data:
|
||||||
chat_id: "{{ states('input_text.wrt_ca_chat_id') | default('102879274') }}"
|
chat_id: "{{ states('input_text.wrt_ca_chat_id') | default('102879274') }}"
|
||||||
message: "<b>Таймер истёк!</b>\nconnect-accept включён автоматически."
|
message: "<b>⏰ Таймер истёк!</b>\nconnect-accept включён автоматически."
|
||||||
inline_keyboard:
|
inline_keyboard:
|
||||||
- "⏸️ Отключить:/wrt_cb_off|{{ states('input_text.wrt_ca_chat_id') | default('102879274') }}, 🔄 Обновить:/wrt_cb_refresh|{{ states('input_text.wrt_ca_chat_id') | default('102879274') }}"
|
- "⏸️ Отключить:/wrt_cb_off|{{ states('input_text.wrt_ca_chat_id') | default('102879274') }}, 🔄 Обновить:/wrt_cb_refresh|{{ states('input_text.wrt_ca_chat_id') | default('102879274') }}"
|
||||||
- "🔙 Главное меню:/menu_back"
|
- "🔙 Главное меню:/menu_back"
|
||||||
|
|||||||
Reference in New Issue
Block a user