From 9cf9bc11d31464efcf3446499a6e1adec35aa377 Mon Sep 17 00:00:00 2001 From: hoellen Date: Sat, 9 Jan 2021 11:51:15 +0100 Subject: [PATCH] Add trigger action to automation class --- __init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/__init__.py b/__init__.py index 22d8c54..4a1b776 100644 --- a/__init__.py +++ b/__init__.py @@ -213,6 +213,9 @@ def showEntities(query): open_or_close = "open" if state != "open" else "close" item.addAction(FuncAction("%s Cover" % (open_or_close.capitalize()), lambda d=data: sendCommand(d, "cover/%s_cover") % (open_or_close))) + if entity_class == "automation": + item.addAction(FuncAction("Trigger", lambda d=data: sendCommand(d, "automation/trigger"))) + item.addAction(ClipAction("Copy ID", entity["entity_id"])) results.append(item)