pyscript icon indicating copy to clipboard operation
pyscript copied to clipboard

When state_hold != None then kwargs will not be set

Open jkrasinger opened this issue 2 years ago • 2 comments

pyscript Version 1.3.3 homeassistant Version 2022.6.7 on hassio on Raspberry Pi

When i set state_hold to a value != None, then kwargs will not be set correctly in a @state_trigger.

Correct: The following state_trigger with state_hold=None set "status=min" on triggering: @state_trigger(f"float({t_sensor}) < float({i_min_day})", state_hold_false=0, state_hold=None, state_check_now=True, kwargs={'status': 'min'})

Wrong: The following state_trigger with state_hold=60 set "status=None" on triggering: @state_trigger(f"float({t_sensor}) < float({i_min_day})", state_hold_false=0, state_hold=60, state_check_now=True, kwargs={'status': 'min'})

jkrasinger avatar Jul 25 '22 12:07 jkrasinger

i support this issue. this bugs me a lot.

ALERTua avatar Jul 26 '22 13:07 ALERTua

This is affecting me as well

absolutezer093 avatar Aug 08 '22 18:08 absolutezer093

I've finally got some time to work on this issue and found a fix. #382

ALERTua avatar Aug 15 '22 17:08 ALERTua