Closed
Description
After the recent master commit 7a81413, that was a fix for #512, kwargs of state_trigger are empty if state_hold argument is used.
@state_trigger(f"{constants.TEST_BOOLEAN}", kwargs=dict(my_kwarg=123))
def tryouts1(trigger_type=None, var_name=None, value=None, old_value=None, context=None, **kwargs):
log.debug(kwargs)
This will output {'my_kwarg': 123}
@state_trigger(f"{constants.TEST_BOOLEAN}", kwargs=dict(my_kwarg=123), state_hold=1)
def tryouts2(trigger_type=None, var_name=None, value=None, old_value=None, context=None, **kwargs):
log.debug(kwargs)
This will output {}
Rolling back to version 1.5.0 fixes the issue.
Metadata
Metadata
Assignees
Labels
No labels