gregmac
(Gregmac)
March 5, 2023, 2:45am
1
I’m working on a blueprint where I need to execute an input action as part of a sequence with actions in the blueprint.
As a minimal example:
blueprint:
name: "Test: action after delay"
domain: automation
input:
action1:
name: Action after delay
selector:
action:
action:
- delay: { seconds: 5 }
- !input action1
This doesn’t work, of course, because !input action1
is an array, so when you try to save an automation this way you get the error:
Unable to determine action @ data[‘action’][1]
My workaround so far is to add a pointless if
statement, just so I can use the then:
parameter:
action:
- delay: { seconds: 5 }
- if: { condition: template, value_template: "{{ true }}" }
then: !input action1
Is there a better way to do this?
gregmac
(Gregmac)
April 18, 2023, 8:13pm
3
That’s pretty much what I have; the key is having the action under a then:
or something that takes a list of actions.
Do you know why you’re checking 'none', 'null', 'unavailable', ''
? I’ve never seen those values be assigned to an action:
selector, and I can’t find a way to make it happen. Perhaps an older HA version?
That’s just the undesirable ones. You can make your own list.‘Nothing’ could be interpeted as any of those, depending.
khvej8
(Khvej8)
June 14, 2024, 9:03pm
5
Hi Gregmac, did you ever find a better solution. I doing the same and it looks pointless.
gregmac
(Gregmac)
June 15, 2024, 4:46am
6
did you ever find a better solution
Unfortunately not. I still have many automations with this.
I just use sequence
or parallel
action:
- sequence: !input action1