Delay in ESPHOME

Hi, i am wondering how the “delay” works in ESPHOME,
does it hold everything like the arduino-delay command or is it non blocking?

Is it right that ESPHOME doesn’t have any timers?

It has the on_time triggers:

Non-blocking:

Screenshot 2022-07-04 at 19-12-49 Automations and Templates

2 Likes

thats good!

Background is:
I have a little garden-house for my chickens, there is a light-detector connected and if sunrise starts a timer/delay should start, then open the chicken-door with a 12V geared motor.
if it is getting dark, also a timer of about 1hour should start to give chicken enough time to get in.
A delay should be there so lightning or high-beam of a car doesn’t trigger to open the chicken-door.

at this time it still runs with plane arduino code on a esp8266, there i am using counters for the delays.
to rewrite it for esphome i think using counters would be the best way, if this is possible.