Hi
I turn on each light with a script. The script is called with the parameter Auto or Switch. Based on if it’s a switch or some sort of automation, that calls the script.
I’ve like be able to call the script within it self with a different parameter, but is not able to. I’ve tried to change mode (Restart or Queued), but with no luck.
Reloaded scripts after each edit.
Cutdown version of script. Each part works if tested individual.
alias: test
sequence:
- variables:
bright_full: 100
- choose:
- conditions:
- condition: template
value_template: "{{ called_by == 'auto' }}"
alias: Auto
sequence:
- action: notify.mobile_app_pixel6a
metadata: {}
data:
message: Test auto
- action: script.test
metadata: {}
data:
called_by: switch
- action: notify.mobile_app_pixel6a
metadata: {}
data:
message: Test au2
alias: Auto
- conditions:
- alias: Switch
condition: template
value_template: "{{ called_by == 'switch' }}"
sequence:
- action: notify.mobile_app_pixel6a
metadata: {}
data:
message: Test Switch
mode: queued
fields:
called_by:
selector:
text: null
name: called_by
description: Script called by Auto or fx Switch
default: auto
required: true
description: ""
max: 2
```