Automation trigger info type hint improvements (#55402)
* Make automation trigger info a TypedDict * zwave_js trigger type hint fixes * Remove redundant automation trigger info field presence checks * Use async_initialize_triggers in mqtt and tasmota device_trigger tests
This commit is contained in:
parent
0749e045bb
commit
b10fc89a6b
46 changed files with 344 additions and 210 deletions
|
@ -37,7 +37,7 @@ async def _handle_webhook(job, trigger_data, hass, webhook_id, request):
|
|||
|
||||
async def async_attach_trigger(hass, config, action, automation_info):
|
||||
"""Trigger based on incoming webhooks."""
|
||||
trigger_data = automation_info.get("trigger_data", {}) if automation_info else {}
|
||||
trigger_data = automation_info["trigger_data"]
|
||||
webhook_id = config.get(CONF_WEBHOOK_ID)
|
||||
job = HassJob(action)
|
||||
hass.components.webhook.async_register(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue