Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.webhook.trigger Namespace Reference

Classes

class  TriggerInstance
 

Functions

None _handle_webhook (HomeAssistant hass, str webhook_id, web.Request request)
 
CALLBACK_TYPE async_attach_trigger (HomeAssistant hass, ConfigType config, TriggerActionType action, TriggerInfo trigger_info)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string CONF_ALLOWED_METHODS = "allowed_methods"
 
string CONF_LOCAL_ONLY = "local_only"
 
tuple DEPENDENCIES = ("webhook",)
 
 TRIGGER_SCHEMA
 
string WEBHOOK_TRIGGERS = f"{DOMAIN}_triggers"
 

Detailed Description

Offer webhook triggered automation rules.

Function Documentation

◆ _handle_webhook()

None homeassistant.components.webhook.trigger._handle_webhook ( HomeAssistant  hass,
str  webhook_id,
web.Request   request 
)
private
Handle incoming webhook.

Definition at line 57 of file trigger.py.

◆ async_attach_trigger()

CALLBACK_TYPE homeassistant.components.webhook.trigger.async_attach_trigger ( HomeAssistant  hass,
ConfigType  config,
TriggerActionType  action,
TriggerInfo  trigger_info 
)
Trigger based on incoming webhooks.

Definition at line 79 of file trigger.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.webhook.trigger._LOGGER = logging.getLogger(__name__)
private

Definition at line 26 of file trigger.py.

◆ CONF_ALLOWED_METHODS

string homeassistant.components.webhook.trigger.CONF_ALLOWED_METHODS = "allowed_methods"

Definition at line 30 of file trigger.py.

◆ CONF_LOCAL_ONLY

string homeassistant.components.webhook.trigger.CONF_LOCAL_ONLY = "local_only"

Definition at line 31 of file trigger.py.

◆ DEPENDENCIES

tuple homeassistant.components.webhook.trigger.DEPENDENCIES = ("webhook",)

Definition at line 28 of file trigger.py.

◆ TRIGGER_SCHEMA

homeassistant.components.webhook.trigger.TRIGGER_SCHEMA
Initial value:
1 = cv.TRIGGER_BASE_SCHEMA.extend(
2  {
3  vol.Required(CONF_PLATFORM): "webhook",
4  vol.Required(CONF_WEBHOOK_ID): cv.string,
5  vol.Optional(CONF_ALLOWED_METHODS): vol.All(
6  cv.ensure_list,
7  [vol.All(vol.Upper, vol.In(SUPPORTED_METHODS))],
8  vol.Unique(),
9  ),
10  vol.Optional(CONF_LOCAL_ONLY): bool,
11  }
12 )

Definition at line 33 of file trigger.py.

◆ WEBHOOK_TRIGGERS

string homeassistant.components.webhook.trigger.WEBHOOK_TRIGGERS = f"{DOMAIN}_triggers"

Definition at line 46 of file trigger.py.