#Helper Toggle in Script Field not working!!!

1 messages · Page 1 of 1 (latest)

covert dagger
#

Can someone please help me understand how Script fields work?
All i want is to be able to call a script and pass it a helper toggle, if its toggle is on, do x, if its off do y.

The part circled in red is what i cannot get to work. To be very clear maintain_light_state is a field, not an entity, when i call this script i pass it an entity (that will be a toggle)

The second pic is an example of me calling the script passing it the Light group and Toggle i want to use, the light group part works perfectly but the toggle for the if statement doesnt

Please help me!!

hollow berry
#

If you want to check if the entity you picked is on for the condition to pass, you want this for a template:
{{ is_state(maintain_light_state, 'on'}}

covert dagger
hollow berry
#

ah right missed the close parenthesis

#

{{ is_state(maintain_light_state, 'on') }}