Python telegram bot mengedit keterangan pesan

Gunakan Telegram di perangkat seluler atau desktop Anda untuk mengirim dan menerima pesan atau perintah ke/dari Asisten Rumah Anda

Integrasi ini membuat layanan pemberitahuan untuk mengirim, atau mengedit pesan yang dikirim sebelumnya, dari akun Bot Telegram yang dikonfigurasi baik dengan platform polling atau dengan webhook, dan memicu peristiwa saat menerima pesan

Jika Anda tidak perlu menerima pesan, Anda dapat menggunakan platform siaran

Layanan pemberitahuan

Layanan yang tersedia.

command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
7,
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
8,
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
9,
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
0,
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
1,
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
2,
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
3, _______________4,
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
5,
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
____6, __________________3, ________3.

Layanan telegram_bot. mengirim pesan

Kirim pemberitahuan

Atribut data layananOpsionalDeskripsi
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
1noMessage isi notifikasi.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
2yaJudul opsional untuk pemberitahuan Anda. Akan disusun sebagai '%judul\n%pesan'.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
3yesSebuah array dari chat_ids pra-otorisasi atau user_ids untuk mengirim pemberitahuan ke. Default ke chat_id pertama yang diizinkan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
4yesParser untuk teks pesan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
5,
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
6 atau
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
7.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
8yaBenar/Salah untuk mengirimkan pesan secara diam-diam. Pengguna iOS dan pengguna web tidak akan menerima notifikasi, pengguna Android akan menerima notifikasi tanpa suara. Default ke Salah.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
9yaBenar/Salah untuk menonaktifkan pratinjau tautan untuk tautan dalam pesan.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
0yesDaftar baris perintah, dipisahkan koma, untuk membuat keyboard kustom.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_1 untuk mengatur ulang ke tanpa keyboard khusus. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
2
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
3yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard inline khusus dengan tombol dengan data callback terkait. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
4 atau
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
5
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
6yesTag untuk pesan terkirim. Dalam
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_7 data peristiwa. ``

Layanan telegram_bot. send_photo

Kirimkan selembar foto

Atribut data layananOpsionalDeskripsi
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
8tidakJalur jarak jauh ke gambar.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_9noJalur lokal ke gambar.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
0yesJudul gambar.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
1yesUsername untuk URL yang memerlukan autentikasi HTTP.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
2yesPassword (atau token pembawa) untuk URL yang memerlukan autentikasi HTTP.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
3yesTentukan metode autentikasi mana yang akan digunakan. Setel ke
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
_4 untuk menggunakan autentikasi intisari HTTP, atau
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
5 untuk OAuth 2. Otentikasi token pembawa 0. Default ke
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
6.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
3yesSebuah array dari chat_ids pra-otorisasi atau user_ids untuk mengirim pemberitahuan ke. Default ke chat_id pertama yang diizinkan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
4yesParser untuk teks pesan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
5,
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
6 atau
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
7.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
8yaBenar/Salah untuk mengirimkan pesan secara diam-diam. Pengguna iOS dan pengguna web tidak akan menerima notifikasi, pengguna Android akan menerima notifikasi tanpa suara. Default ke Salah.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
3yaBenar/salah untuk memeriksa sertifikat SSL server untuk URL HTTPS. Default ke True.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
4yesTimeout untuk mengirim foto dalam hitungan detik. Akan membantu dengan kesalahan batas waktu (koneksi internet buruk, dll)
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
0yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard khusus.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_1 untuk mengatur ulang ke tanpa keyboard khusus. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
2
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
3yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard inline khusus dengan tombol dengan data callback terkait. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
4 atau
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
5
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
6yesTag untuk pesan terkirim. Dalam
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_7 data peristiwa. ``

Layanan telegram_bot. mengirim video

Kirim video

Atribut data layananOpsionalDeskripsi
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
8tidakJalur jarak jauh ke video.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_9noJalur lokal ke video.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
0yaJudul videonya.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
1yesUsername untuk URL yang memerlukan autentikasi HTTP.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
2yesPassword (atau token pembawa) untuk URL yang memerlukan autentikasi HTTP.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
3yesTentukan metode autentikasi mana yang akan digunakan. Setel ke
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
_4 untuk menggunakan autentikasi intisari HTTP, atau
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
5 untuk OAuth 2. Otentikasi token pembawa 0. Default ke
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
6.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
3yesSebuah array dari chat_ids pra-otorisasi atau user_ids untuk mengirim pemberitahuan ke. Default ke chat_id pertama yang diizinkan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
4yesParser untuk teks pesan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
5,
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
6 atau
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
7.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
8yaBenar/salah untuk mengirim pesan secara diam-diam. Pengguna iOS dan pengguna web tidak akan menerima notifikasi. Pengguna Android akan menerima notifikasi tanpa suara. Default ke Salah.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
3yaBenar/salah untuk memeriksa sertifikat SSL server untuk URL HTTPS. Default ke True.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
4yesTimeout untuk mengirim video dalam hitungan detik. Akan membantu dengan kesalahan batas waktu (koneksi internet buruk, dll)
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
0yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard khusus.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_1 untuk mengatur ulang ke tanpa keyboard khusus. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
2
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
3yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard inline khusus dengan tombol dengan data callback terkait. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
4 atau
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
5

Layanan telegram_bot. send_animation

Kirim animasi

Atribut data layananOpsionalDeskripsi
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
8tidakJalur jarak jauh ke GIF atau H. 264/MPEG-4 video AVC tanpa suara.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_9noLocal path ke GIF atau H. 264/MPEG-4 video AVC tanpa suara.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
0yaJudul animasinya.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
1yesUsername untuk URL yang memerlukan autentikasi HTTP.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
2yesPassword (atau token pembawa) untuk URL yang memerlukan autentikasi HTTP.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
3yesTentukan metode autentikasi mana yang akan digunakan. Setel ke
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
_4 untuk menggunakan autentikasi intisari HTTP, atau
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
5 untuk OAuth 2. Otentikasi token pembawa 0. Default ke
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
6.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
3yesSebuah array dari chat_ids pra-otorisasi atau user_ids untuk mengirim pemberitahuan ke. Default ke chat_id pertama yang diizinkan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
4yesParser untuk teks pesan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
5,
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
6 atau
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
7.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
8yaBenar/salah untuk mengirim pesan secara diam-diam. Pengguna iOS dan pengguna web tidak akan menerima notifikasi. Pengguna Android akan menerima notifikasi tanpa suara. Default ke Salah.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
3yaBenar/salah untuk memeriksa sertifikat SSL server untuk URL HTTPS. Default ke True.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
4yesTimeout untuk mengirim video dalam hitungan detik. Akan membantu dengan kesalahan batas waktu (koneksi internet buruk, dll)
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
0yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard khusus.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_1 untuk mengatur ulang ke tanpa keyboard khusus. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
2
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
3yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard inline khusus dengan tombol dengan data callback terkait. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
4 atau
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
5
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
6yesTag untuk pesan terkirim. Dalam
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_7 data peristiwa. ``

Layanan telegram_bot. send_voice

Kirim pesan suara

Atribut data layananOpsionalDeskripsi
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
8tidak ada Jalur jarak jauh ke pesan suara.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
9noJalur lokal ke pesan suara.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
0yaJudul pesan suara.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
1yesUsername untuk URL yang memerlukan autentikasi HTTP.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
2yesPassword (atau token pembawa) untuk URL yang memerlukan autentikasi HTTP.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
3yesTentukan metode autentikasi mana yang akan digunakan. Setel ke
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
_4 untuk menggunakan autentikasi intisari HTTP, atau
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
5 untuk OAuth 2. Otentikasi token pembawa 0. Default ke
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
6.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
3yesSebuah array dari chat_ids pra-otorisasi atau user_ids untuk mengirim pemberitahuan ke. Default ke chat_id pertama yang diizinkan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
8yaBenar/salah untuk mengirim pesan secara diam-diam. Pengguna iOS dan pengguna web tidak akan menerima notifikasi. Pengguna Android akan menerima notifikasi tanpa suara. Default ke Salah.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
3yaBenar/salah untuk memeriksa sertifikat SSL server untuk URL HTTPS. Default ke True.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
4yesTimeout untuk mengirim suara dalam hitungan detik. Akan membantu dengan kesalahan batas waktu (koneksi internet buruk, dll)
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
0yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard khusus.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_1 untuk mengatur ulang ke tanpa keyboard khusus. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
2
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
3yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard inline khusus dengan tombol dengan data callback terkait. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
4 atau
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
5
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
6yesTag untuk pesan terkirim. Dalam
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_7 data peristiwa. ``

Layanan telegram_bot. send_sticker

Kirim stiker

Atribut data layananOpsionalDeskripsi
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
8noRemote path ke statis. webp atau animasi. stiker tgs.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
9noLocal path ke statis. webp atau animasi. stiker tgs.
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
44noID stiker yang ada di server telegram. ID dapat ditemukan dengan mengirimkan stiker ke bot Anda dan menanyakan metode telegram-api atau dengan menggunakan @idstickerbot
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
1yesUsername untuk URL yang memerlukan otentikasi HTTP.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
2yesPassword (atau token pembawa) untuk URL yang memerlukan autentikasi HTTP.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
3yesTentukan metode autentikasi mana yang akan digunakan. Setel ke
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
_4 untuk menggunakan autentikasi intisari HTTP, atau
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
5 untuk OAuth 2. Otentikasi token pembawa 0. Default ke
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
6.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
3yesSebuah array dari chat_ids pra-otorisasi atau user_ids untuk mengirim pemberitahuan ke. Default ke chat_id pertama yang diizinkan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
8yaBenar/Salah untuk mengirimkan pesan secara diam-diam. Pengguna iOS dan pengguna web tidak akan menerima notifikasi, pengguna Android akan menerima notifikasi tanpa suara. Default ke Salah.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
3yaBenar/salah untuk memeriksa sertifikat SSL server untuk URL HTTPS. Default ke True.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
4yesTimeout untuk mengirim foto dalam hitungan detik. Akan membantu dengan kesalahan batas waktu (koneksi internet buruk, dll)
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
0yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard khusus.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_1 untuk mengatur ulang ke tanpa keyboard khusus. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
2
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
3yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard inline khusus dengan tombol dengan data callback terkait. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
4 atau
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
5
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
6yesTag untuk pesan terkirim. Dalam
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_7 data peristiwa. ``

Layanan telegram_bot. send_document

Kirim dokumen

Atribut data layananOpsionalDeskripsi
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
8tidakJalur jarak jauh ke dokumen.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
9noJalur lokal ke dokumen.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
0yaJudul dokumen.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
1yesUsername untuk URL yang memerlukan autentikasi HTTP.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
2yesPassword (atau token pembawa) untuk URL yang memerlukan autentikasi HTTP.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
3yesTentukan metode autentikasi mana yang akan digunakan. Setel ke
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
_4 untuk menggunakan autentikasi intisari HTTP, atau
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
5 untuk OAuth 2. Otentikasi token pembawa 0. Default ke
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
6.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
3yesSebuah array dari chat_ids pra-otorisasi atau user_ids untuk mengirim pemberitahuan ke. Default ke chat_id pertama yang diizinkan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
4yesParser untuk teks pesan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
5,
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
6 atau
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
7.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
8yaBenar/Salah untuk mengirimkan pesan secara diam-diam. Pengguna iOS dan pengguna web tidak akan menerima notifikasi, pengguna Android akan menerima notifikasi tanpa suara. Default ke Salah.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
3yaBenar/salah untuk memeriksa sertifikat SSL server untuk URL HTTPS. Default ke True.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
4yesTimeout untuk mengirim dokumen dalam hitungan detik. Akan membantu dengan kesalahan batas waktu (koneksi internet buruk, dll)
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
0yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard khusus.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_1 untuk mengatur ulang ke tanpa keyboard khusus. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
2
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
3yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard inline khusus dengan tombol dengan data callback terkait. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
4 atau
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
5
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
6yesTag untuk pesan terkirim. Dalam
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_7 data peristiwa. ``

Layanan telegram_bot. Kirim lokasi

Kirim lokasi

Atribut data layananOpsionalDeskripsi
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
88noLintang untuk mengirim.
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
89no Bujur yang akan dikirim.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
3yesSebuah array dari chat_ids pra-otorisasi atau user_ids untuk mengirim pemberitahuan ke. Default ke yang pertama diizinkan
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_91.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
8yaBenar/Salah untuk mengirimkan pesan secara diam-diam. Pengguna iOS dan pengguna web tidak akan menerima notifikasi, pengguna Android akan menerima notifikasi tanpa suara. Default ke Salah.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
0yesDaftar baris perintah, dipisahkan koma, untuk membuat keyboard kustom.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_1 untuk mengatur ulang ke tanpa keyboard khusus. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
2
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
3yaDaftar baris perintah, dipisahkan koma, untuk membuat keyboard inline khusus dengan tombol dengan data callback terkait. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
4 atau
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
5
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
6yesTag untuk pesan terkirim. Dalam
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
_7 data peristiwa. ``

Layanan telegram_bot. send_poll

Kirim jajak pendapat

Atribut data layananOpsionalDeskripsi
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
01pertanyaan tanpa polling, 1-300 karakter.
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
02noDaftar pilihan jawaban, 2-10 string masing-masing 1-100 karakter.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
3yesSebuah array dari chat_ids pra-otorisasi atau user_ids untuk mengirim pemberitahuan ke. Default ke yang pertama diizinkan
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_91.
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
05yesTrue/false jika jajak pendapat harus anonim, default ke True.
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
06yesTrue/false jika jajak pendapat memungkinkan banyak jawaban, default ke False.
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
07yesJumlah waktu dalam detik polling akan aktif setelah pembuatan, 5-600.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
8yaBenar/Salah untuk mengirimkan pesan secara diam-diam. Pengguna iOS dan pengguna web tidak akan menerima notifikasi, pengguna Android akan menerima notifikasi tanpa suara. Default ke Salah.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
4yesTimeout untuk mengirim suara dalam hitungan detik. Akan membantu dengan kesalahan batas waktu (koneksi internet buruk, dll)

Layanan telegram_bot. edit_message

Edit pesan yang dikirim sebelumnya dalam percakapan

Atribut data layananOpsionalDeskripsi
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
10Tidak ada pesan yang akan diedit. Saat menjawab panggilan balik dari tombol yang ditekan, id dari pesan asal masuk.
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_11. Anda dapat menggunakan
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_12 untuk merujuk ke pesan terakhir yang dikirim ke
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
91.
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
91noID_obrolan tempat mengedit pesan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
1noMessage tubuh pemberitahuan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
2yaJudul opsional untuk pemberitahuan Anda. Akan disusun sebagai '%judul\n%pesan'.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
4yesParser untuk teks pesan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
5,
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
6 atau
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
7.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
9yaBenar/Salah untuk menonaktifkan pratinjau tautan untuk tautan dalam pesan.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
3yesDaftar baris perintah, dipisahkan koma, untuk membuat keyboard inline khusus dengan tombol dengan data callback terkait. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
4 atau
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
5

Layanan telegram_bot. edit_caption

Edit judul pesan yang dikirim sebelumnya

Atribut data layananOpsionalDeskripsi
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
10Tidak ada pesan yang akan diedit. Saat menjawab panggilan balik dari tombol yang ditekan, id dari pesan asal masuk.
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_11. Anda dapat menggunakan
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_12 untuk merujuk ke pesan terakhir yang dikirim ke
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
91.
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
91noID_obrolan tempat mengedit teks.
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'
0noMessage tubuh pemberitahuan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
9yaBenar/Salah untuk menonaktifkan pratinjau tautan untuk tautan dalam pesan.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
3yesDaftar baris perintah, dipisahkan koma, untuk membuat keyboard inline khusus dengan tombol dengan data callback terkait. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
4 atau
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
5

Layanan telegram_bot. edit_replymarkup

Edit keyboard sebaris dari pesan yang dikirim sebelumnya

Atribut data layananOpsionalDeskripsi
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
10Tidak ada pesan yang akan diedit. Saat menjawab panggilan balik dari tombol yang ditekan, id dari pesan asal masuk.
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_11. Anda dapat menggunakan
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_12 untuk merujuk ke pesan terakhir yang dikirim ke
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
91.
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
91noID_obrolan tempat mengedit markup_balasan.
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
9yaBenar/Salah untuk menonaktifkan pratinjau tautan untuk tautan dalam pesan.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
3yesDaftar baris perintah, dipisahkan koma, untuk membuat keyboard inline khusus dengan tombol dengan data callback terkait. Contoh.
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
4 atau
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
5

Layanan telegram_bot. answer_callback_query

Menanggapi permintaan panggilan balik yang berasal dengan mengklik tombol keyboard online. Jawabannya akan ditampilkan kepada pengguna sebagai notifikasi di bagian atas layar obrolan atau sebagai peringatan

Atribut data layananOpsionalDeskripsi
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
1noBadan pesan teks yang tidak diformat dari notifikasi.
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
45noUnique id dari respons callback. Dalam data peristiwa
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_46.
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
47
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
48yaBenar/salah untuk menunjukkan pemberitahuan permanen. Default ke Salah

Layanan telegram_bot. Hapus pesan

Hapus pesan yang dikirim sebelumnya dalam percakapan

Atribut data layananOpsionalDeskripsi
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
10tidak ada pesan yang akan dihapus. Saat menjawab panggilan balik dari tombol yang ditekan, id dari pesan asal masuk.
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_11. Anda dapat menggunakan
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_12 untuk merujuk ke pesan terakhir yang dikirim ke
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
91.
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
91noThe chat_id di mana untuk menghapus pesan

Layanan telegram_bot. leave_chat

Hapus bot dari grup obrolan tempat bot itu ditambahkan

Atribut data layananOpsionalDeskripsi
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
91noChat_id dari mana menghapus bot

Platform notifikasi Telegram

Platform pemberitahuan

text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_55 memerlukan integrasi
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
56 untuk bekerja dengannya, dan itu dirancang untuk menghasilkan pintasan yang disesuaikan (
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
57) untuk mengirim pemberitahuan (pesan, foto, dokumen, dan lokasi) ke
command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
91 tertentu dengan sintaks lama, memungkinkan kompatibilitas mundur. Atribut data
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
_4,
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
8,
alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"
6 dan
data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"
9 juga didukung

Konfigurasi YAML yang diperlukan sekarang direduksi menjadi

notify:
  - platform: telegram
    name: NOTIFIER_NAME
    chat_id: USER_CHAT_ID

Pemicu peristiwa

Sebuah perintah terlihat seperti

text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
63 atau
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
64

Saat diterima oleh Asisten Rumah, ini akan memicu peristiwa

text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
65 di bus acara dengan
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
66 berikut

command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"

Pesan lain apa pun yang tidak dimulai dengan

text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
67 akan diproses sebagai teks sederhana, memicu peristiwa
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
68 di bus acara dengan
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
66 berikut

text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"

Jika pesan dikirim dari , misalnya, kueri panggilan balik diterima, dan Asisten Rumah akan memecat peristiwa

text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
46 dengan

data: "<data associated to action callback>"
message: <message origin of the action callback>
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
id: "<unique id of the callback>"
chat_instance: "<chat instance>"
chat_id: "<origin chat id>"

Sampel konfigurasi

Contoh pingpong sederhana

alias: 'Telegram bot that reply pong to ping'
trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/ping"
action:
  - service: notify.notify
    data:
      message: "pong"

Contoh yang menampilkan interaksi keyboard dengan

text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_71

trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/start"
action:
  - service: notify.telegram
    data:
      message: "commands"
      data:
        keyboard:
          - '/ping, /alarm'
          - '/siren'

dan otomatisasi untuk memicu perintah terkait "/siren"

trigger:
  platform: event
  event_type: telegram_command
  event_data:
    command: "/siren"
action:
  - service: homeassistant.turn_on
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0
  - delay:
      seconds: 10
  - service: homeassistant.turn_off
    target:
      entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0

Contoh untuk menunjukkan penggunaan event_data dalam tindakan

- alias: 'Kitchen Telegram Speak'
  trigger:
    platform: event
    event_type: telegram_command
    event_data:
      command: "/speak"
  action:
    - service: notify.kitchen_echo
      data:
        message: >
          Message from {{ trigger.event.data["from_first"] }}. {% for state in trigger.event.data["args"] %} {{ state }} {% endfor %}

Contoh otomatisasi dengan kueri panggilan balik dan keyboard sebaris

Contoh cepat untuk menunjukkan beberapa kemampuan panggilan balik keyboard sebaris dengan otomatisasi bodoh yang terdiri dari pengulang sederhana teks normal yang menghadirkan keyboard sebaris dengan 3 tombol. 'EDIT', 'TIDAK' dan 'HAPUS TOMBOL'

  • Menekan 'EDIT' mengubah pesan terkirim
  • Menekan 'TIDAK' hanya menampilkan pemberitahuan singkat (menjawab permintaan panggilan balik)
  • Menekan 'REMOVE BUTTON' mengubah keyboard sebaris menghapus tombol itu

Pengulang teks

- alias: 'Telegram bot that repeats text'
  trigger:
    platform: event
    event_type: telegram_text
  action:
    - service: telegram_bot.send_message
      data:
        title: "*Dumb automation*"
        target: "{{ trigger.event.data.user_id }}"
        message: "You said: {{ trigger.event.data.text }}"
        disable_notification: true
        inline_keyboard:
          - "Edit message:/edit_msg, Don't:/do_nothing"
          - "Remove this button:/remove_button"

Editor pesan

- alias: 'Telegram bot that edits the last sent message'
  trigger:
    platform: event
    event_type: telegram_callback
    event_data:
      command: "/edit_msg"
  action:
    - service: telegram_bot.answer_callback_query
      data:
        callback_query_id: "{{ trigger.event.data.id }}"
        message: "Editing the message!"
        show_alert: true
    - service: telegram_bot.edit_message
      data:
        message_id: "{{ trigger.event.data.message.message_id }}"
        chat_id: "{{ trigger.event.data.chat_id }}"
        title: "*Message edit*"
        inline_keyboard:
          - "Edit message:/edit_msg, Don't:/do_nothing"
          - "Remove this button:/remove_button"
        message: >
          Callback received from {{ trigger.event.data.from_first }}.
          Message id: {{ trigger.event.data.message.message_id }}.
          Data: {{ trigger.event.data.data|replace("_", "\_") }}

Editor papan ketik

command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
0

Hanya mengakui jawaban 'TIDAK'

command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_1

Panggilan balik Telegram juga mendukung argumen dan perintah dengan cara yang sama seperti pesan biasa

command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_2

Dalam hal ini, melakukan panggilan balik dengan

text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
72 akan memunculkan pemberitahuan yang mengatakan
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
73

Menerima

command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
91 dan
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
10 pengidentifikasi pesan terkirim oleh
text: "some text received"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
56

command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_3

Contoh. send_message dengan Teks yang diformat

command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_4

Contoh. send_message dengan tag pesan

command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
5

Contoh. send_message dengan pratinjau halaman web yang dinonaktifkan

command: "/thecommand"
args: "<any other text following the command>"
from_first: "<first name of the sender>"
from_last: "<last name of the sender>"
user_id: "<id of the sender>"
chat_id: "<origin chat id>"
chat: "<chat info>"
_6

Sarankan edit ke halaman ini, atau berikan/lihat umpan balik untuk halaman ini

Edit Berikan umpan balik Lihat umpan balik yang tertunda

Python telegram bot mengedit keterangan pesan

Integrasi bot Telegram diperkenalkan di Home Assistant 0. 42, dan digunakan oleh 5. 8% dari instalasi aktif. Kelas IoT-nya adalah

Bagaimana cara mengedit teks di Telegram?

Ini berfungsi di semua obrolan Telegram, termasuk grup dan percakapan pribadi. Cukup ketuk dan tahan pesan, lalu tekan 'Edit' .

Bagaimana cara menulis bot Telegram untuk mengirim pesan dengan Python?

Pertama, buat bot menggunakan Telegram BotFather. .
Buka aplikasi telegram dan cari @BotFather
Klik tombol mulai atau kirim "/mulai"
Kemudian kirim pesan “/newbot” untuk mengatur nama dan nama pengguna
Setelah menetapkan nama dan nama pengguna, BotFather akan memberi Anda token API yang merupakan token bot Anda. \

Bisakah BOT telegram membaca pesan saluran?

Semua bot, apa pun setelannya, akan menerima. Semua pesan layanan. Semua pesan dari obrolan pribadi dengan pengguna. Semua pesan dari saluran tempat mereka menjadi anggota .

Bagaimana cara menginstal Telegram ext dengan Python?

1 Jawaban .
Instal pip instal telegram
Instal pip instal python-telegram-bot
Jika Anda menggunakan lingkungan virtual, pastikan sudah aktif
Sekarang impor dari telegram. impor ext *