Skip to content

Commit

Permalink
adjust number of args allowed for @event_trigger,
Browse files Browse the repository at this point in the history
@mqtt_trigger and @task_unique to allow all args to be positional or keyword.
See #519.
  • Loading branch information
craigbarratt committed Aug 25, 2023
1 parent e99af88 commit 8b3f4d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/pyscript/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,12 @@ async def trigger_init(self, trig_ctx, func_name):
"time_trigger",
}
arg_check = {
"event_trigger": {"arg_cnt": {1, 2}, "rep_ok": True},
"mqtt_trigger": {"arg_cnt": {1, 2}, "rep_ok": True},
"event_trigger": {"arg_cnt": {1, 2, 3}, "rep_ok": True},
"mqtt_trigger": {"arg_cnt": {1, 2, 3}, "rep_ok": True},
"state_active": {"arg_cnt": {1}},
"state_trigger": {"arg_cnt": {"*"}, "type": {list, set}, "rep_ok": True},
"service": {"arg_cnt": {0, "*"}},
"task_unique": {"arg_cnt": {1}},
"task_unique": {"arg_cnt": {1, 2}},
"time_active": {"arg_cnt": {"*"}},
"time_trigger": {"arg_cnt": {0, "*"}, "rep_ok": True},
}
Expand Down

0 comments on commit 8b3f4d8

Please sign in to comment.