no problem.
no you can use entity_id’s but you need to use states platform/conditions and services for the actions. those different options are available thru the UI dropdown.
And most of the advanced users use those instead of the device_id stuff because of some limitations using those.
one being that you can’t edit/create a device “thing” manually.
yes you can go to developers tools->states tab and look for the entity id of stuff there.
I have to say that those entity_ids look super weird. But I never use the automation editor so that may be normal depending on how the integration creates the entities.
without knowing the entity_id’s of the entities this is basically how the automation you have as written above would look using states/conditions and services:
alias: Gen Start
trigger:
- platform: state
entity_id: binary_sensor.aef0db9b684d219b79c1da7cbd95f0d6 # or whatever the real entity_id for the binary sensor is
to: 'on'
action:
- if:
- condition: state
entity_id: binary_sensor.0c5191974d52b45fd407943b75d2d7d2 # same here
state: 'on'
then:
- service: switch.turn_on
entity_id: switch.7ab167660a4620e1575494471936f6d7 # same
- delay:
seconds: 30
- if:
- condition: state
entity_id: binary_sensor.0c5191974d52b45fd407943b75d2d7d2
state: 'on'
then:
- service: switch.turn_on
entity_id: switch.7ab167660a4620e1575494471936f6d7 # same
- delay:
seconds: 30
- if:
- condition: state
entity_id: binary_sensor.0c5191974d52b45fd407943b75d2d7d2 #same
state: 'off'
then:
- service: switch.turn_on
entity_id: switch.2ce7a1c1043e1234dee2748de941fa9f #same
- service: switch.turn_on
entity_id: switch.defefbccc9bfa91ba0545e27a3ab8637 # same
else:
- service: switch.turn_on
entity_id: switch.2ce7a1c1043e1234dee2748de941fa9f
- service: switch.turn_on
entity_id: switch.defefbccc9bfa91ba0545e27a3ab8637
else:
- service:switch.turn_on
entity_id: switch.2ce7a1c1043e1234dee2748de941fa9f
- service: switch.turn_on
entity_id: switch.defefbccc9bfa91ba0545e27a3ab8637
mode: single
if those entity_id’s are correct the first thing I would do is to change them to something more human readable. you should be able to do that thru the UI (at least for most/many integrations).
TBH, I’m not sure how you could use a wait instead of a delay unless the delay of 30 seconds might not be long enough to allow the binary sensor to come on before a retry of the “rollup” switch.
to me it looks like the code above is exactly as you have in your flow chart.
But if the goal is to repeat the switch turn on action until the binary sensor turns off I think I would just use a “repeat-until” action. And you can then use an repeat index to stop the run after a certain number of tries.
I think based on your flow chart this will do it:
alias: Gen Start
trigger:
- platform: state
entity_id: binary_sensor.aef0db9b684d219b79c1da7cbd95f0d6 # or whatever the real entity_id for the binary sensor is
to: 'on'
action:
- choose:
- condition: state
entity_id: binary_sensor.0c5191974d52b45fd407943b75d2d7d2 # same here
state: 'on'
sequence:
- repeat:
sequence:
- service: switch.turn_on
entity_id: switch.7ab167660a4620e1575494471936f6d7 # same
- delay:
seconds: 30
until:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.0c5191974d52b45fd407943b75d2d7d2 # same
state: 'off'
- "{{ repeat.index == 3 }}"
- if:
- condition: state
entity_id: binary_sensor.0c5191974d52b45fd407943b75d2d7d2 #same
state: 'on'
then:
- some_other_thing
default:
- service:switch.turn_on
entity_id: switch.2ce7a1c1043e1234dee2748de941fa9f #
- service: switch.turn_on
entity_id: switch.defefbccc9bfa91ba0545e27a3ab8637 #
mode: single
it turns on the switch - waits 30 seconds and if the binary sensor is still on then again turns on the switch - waits 30 seconds - … until it repeats the loop 3 times. it will then exit the repeat loop and do the thing in the “if” if the binary sensor is still on.
I think…
But the other thing I noticed is that nothing in your flow turns the rollup switch back off again. So the switch turn on won’t do anything since the switch is already on. you’ll need to deal with that if it’s an issue.