Skip to content

kwargs are empty if state_hold is used #516

Closed
@ALERTua

Description

@ALERTua

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions