Closed
Description
With the new additions of 1.3. I got a problem, that is easy to work around but may need some attention:
@mqtt_trigger(...)
@state_active(...)
@task_unique(...)
def lueften():
SOME
no fails with:
2021-02-26 09:20:09 ERROR (MainThread) [custom_components.pyscript.function] run_coro: got exception Traceback (most recent call last):
File "/config/custom_components/pyscript/eval.py", line 697, in call
elif i < len(self.kw_defaults) and self.kw_defaults[i]["ok"]:
TypeError: lueften() called with unexpected keyword arguments: payload, payload_obj, qos, topic, trigger_type
Easy to work around:
@mqtt_trigger(...)
@state_active(...)
@task_unique(...)
def lueften(**kwargs):
SOME
But it would be handy to also be allowed to not expect any parameter.
Metadata
Metadata
Assignees
Labels
No labels