custom-components / pyscript

Pyscript adds rich Python scripting to HASS
Apache License 2.0
874 stars 46 forks source link

Fixes #374 #382

Closed ALERTua closed 2 years ago

ALERTua commented 2 years ago

short test to prove the fix works:

@state_trigger("input_boolean.test_boolean", state_hold=1, kwargs={'test_kwarg': 123})
def tryouts(trigger_type=None, var_name=None, value=None, old_value=None, context=None, **kwargs):
    log.debug(f"tryouts trigger_type: {trigger_type}, {kwargs}")
    if kwargs.get('test_kwarg') == 123:
        log.debug("after the fix")
    else:
        log.debug("before the fix")
craigbarratt commented 2 years ago

Thanks for the fix!

JayNewstrom commented 1 year ago

@craigbarratt could you do a release with this fix?