Enhance delay function

Would love to see an enhancement for the delay function to pass it a state of an entity.

- delay 
  entity_id: light.somewhere
  state: 'on'

So the delay would wait until the next sequence was triggered.

This is similar to