condition + repeat node
This commit is contained in:
1 parent
89c7007612
commit
07ab4b9089
22 files changed
+631
-282
No files matched your search
@@ -358,6 +358,10 @@ ChooseAuto.args = {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
choose: [],
|
||||
default: [],
|
||||
},
|
||||
{
|
||||
service: "switch.turn_on",
|
||||
target: {
|
||||
@@ -367,3 +371,60 @@ ChooseAuto.args = {
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
export const EmptyChooseAuto = Template.bind({});
|
||||
|
||||
EmptyChooseAuto.args = {
|
||||
...EmptyChooseAuto.args,
|
||||
automation: {
|
||||
condition: [],
|
||||
trigger: [],
|
||||
sequence: [
|
||||
{
|
||||
choose: [],
|
||||
default: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
export const RepeatAuto = Template.bind({});
|
||||
RepeatAuto.args = {
|
||||
...RepeatAuto.args,
|
||||
automation: {
|
||||
condition: [],
|
||||
trigger: [],
|
||||
sequence: [
|
||||
{
|
||||
repeat: {
|
||||
while: 'states(lights.switch) == "on"',
|
||||
sequence: [
|
||||
{
|
||||
delay: {
|
||||
minutes: 5,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
repeat: {
|
||||
count: 2,
|
||||
until: [
|
||||
{
|
||||
condition: "state",
|
||||
entity_id: "lights.bathroom",
|
||||
state: "off",
|
||||
},
|
||||
],
|
||||
sequence: [
|
||||
{
|
||||
entity_id: "button.ping_mainboard",
|
||||
service: "button.pres",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
Reference in new issue
Block a user