diff --git a/source/_components/notify.telegram.markdown b/source/_components/notify.telegram.markdown index 5afe840e143..74e8cf8d754 100644 --- a/source/_components/notify.telegram.markdown +++ b/source/_components/notify.telegram.markdown @@ -48,7 +48,7 @@ To enable Telegram notifications in your installation, add the following to your ```yaml # Example configuration.yaml entry for the Telegram Bot telegram_bot: - platform: webhooks + platform: polling api_key: ABCDEFGHJKLMNOPQRSTUVXYZ allowed_chat_ids: - CHAT_ID_1 diff --git a/source/_components/telegram_bot.markdown b/source/_components/telegram_bot.markdown index a86c32664f7..69a58146fb5 100644 --- a/source/_components/telegram_bot.markdown +++ b/source/_components/telegram_bot.markdown @@ -14,7 +14,7 @@ ha_release: 0.42 Use Telegram on your mobile or desktop device to send and receive messages or commands to/from your Home Assistant. -This component creates notification services to send, or edit previously sent, messages from a [Telegram Bot account](https://core.telegram.org/bots) configured either with the [polling](/_components/telegram_bot.polling.markdown) method or with the [webhooks](/_components/telegram_bot.webhooks.markdown) one, and trigger events when receiving messages. +This component creates notification services to send, or edit previously sent, messages from a [Telegram Bot account](https://core.telegram.org/bots) configured either with the [polling](/components/telegram_bot.polling/) method or with the [webhooks](/components/telegram_bot.webhooks/) one, and trigger events when receiving messages. ### {% linkable_title Notification services %} @@ -122,7 +122,7 @@ Respond to a callback query originated by clicking on an online keyboard button. ### {% linkable_title `Telegram` notification platform %} -The [Telegram notification platform](/_components/notify.telegram.markdown) requires the `telegram_bot` component to work with, and it's designed to generate a customised shortcut (`notify.USERNAME`) to send notifications (messages, photos, documents and locations) to a particular `chat_id` with the old syntax, allowing backward compatibility. +The [Telegram notification platform](/components/notify.telegram/) requires the `telegram_bot` component to work with, and it's designed to generate a customised shortcut (`notify.USERNAME`) to send notifications (messages, photos, documents and locations) to a particular `chat_id` with the old syntax, allowing backward compatibility. The required yaml configuration now reduces to: ```yaml @@ -145,6 +145,7 @@ args: "" from_first: "" from_last: "" user_id: "" +chat_id: "" ``` Any other message not starting with `/` will be processed as simple text, firing a `telegram_text` event on the event bus with the following `event_data`: @@ -154,6 +155,7 @@ text: "some text received" from_first: "" from_last: "" user_id: "" +chat_id: "" ``` if the message is sent from a [press from an inline button](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), for example, a callback query is received, and Home Assistant will fire a `telegram_callback` event with: @@ -166,6 +168,7 @@ from_last: "" user_id: "" id: "" chat_instance: "" +chat_id: "" ``` ### {% linkable_title Configuration samples %} @@ -216,7 +219,7 @@ trigger: action: - service: homeassistant.turn_on entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0 - - delay: + - delay: seconds: 10 - service: homeassistant.turn_off entity_id: switch.vision_zm1601eu5_battery_operated_siren_switch_9_0 @@ -331,7 +334,7 @@ Only acknowledges the 'NO' answer: message: 'OK, you said no!' ``` -For a more complex usage of the `telegram_bot` capabilities, using [AppDaemon](https://home-assistant.io/docs/ecosystem/appdaemon/tutorial/) is advised. +For a more complex usage of the `telegram_bot` capabilities, using [AppDaemon](/docs/ecosystem/appdaemon/tutorial/) is advised. This is how the previous 4 automations would be through a simple AppDaemon app: