Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.telegram_bot.webhooks.PushBot Class Reference
Inheritance diagram for homeassistant.components.telegram_bot.webhooks.PushBot:
[legend]
Collaboration diagram for homeassistant.components.telegram_bot.webhooks.PushBot:
[legend]

Public Member Functions

def __init__ (self, hass, bot, config, secret_token)
 
def deregister_webhook (self)
 
def register_webhook (self)
 
def start_application (self)
 
def stop_application (self, event=None)
 

Public Attributes

 application
 
 base_url
 
 bot
 
 secret_token
 
 trusted_networks
 
 webhook_url
 

Private Member Functions

def _try_to_set_webhook (self)
 

Detailed Description

Handles all the push/webhook logic and passes telegram updates to `self.handle_update`.

Definition at line 58 of file webhooks.py.

Constructor & Destructor Documentation

◆ __init__()

def homeassistant.components.telegram_bot.webhooks.PushBot.__init__ (   self,
  hass,
  bot,
  config,
  secret_token 
)
Create Application before calling super().

Definition at line 61 of file webhooks.py.

Member Function Documentation

◆ _try_to_set_webhook()

def homeassistant.components.telegram_bot.webhooks.PushBot._try_to_set_webhook (   self)
private

Definition at line 76 of file webhooks.py.

◆ deregister_webhook()

def homeassistant.components.telegram_bot.webhooks.PushBot.deregister_webhook (   self)
Query telegram and deregister the URL for our webhook.

Definition at line 128 of file webhooks.py.

◆ register_webhook()

def homeassistant.components.telegram_bot.webhooks.PushBot.register_webhook (   self)
Query telegram and register the URL for our webhook.

Definition at line 97 of file webhooks.py.

◆ start_application()

def homeassistant.components.telegram_bot.webhooks.PushBot.start_application (   self)
Handle starting the Application object.

Definition at line 92 of file webhooks.py.

◆ stop_application()

def homeassistant.components.telegram_bot.webhooks.PushBot.stop_application (   self,
  event = None 
)
Handle gracefully stopping the Application object.

Definition at line 122 of file webhooks.py.

Member Data Documentation

◆ application

homeassistant.components.telegram_bot.webhooks.PushBot.application

Definition at line 67 of file webhooks.py.

◆ base_url

homeassistant.components.telegram_bot.webhooks.PushBot.base_url

Definition at line 71 of file webhooks.py.

◆ bot

homeassistant.components.telegram_bot.webhooks.PushBot.bot

Definition at line 63 of file webhooks.py.

◆ secret_token

homeassistant.components.telegram_bot.webhooks.PushBot.secret_token

Definition at line 65 of file webhooks.py.

◆ trusted_networks

homeassistant.components.telegram_bot.webhooks.PushBot.trusted_networks

Definition at line 64 of file webhooks.py.

◆ webhook_url

homeassistant.components.telegram_bot.webhooks.PushBot.webhook_url

Definition at line 74 of file webhooks.py.


The documentation for this class was generated from the following file: