Looks like ESPHome isn’t happy when on_press
handler takes 200 ms or more, but I need to generate a short 200ms pulse on GPIO pin
button:
- platform: template
id: remote
name: "Remote"
icon: "mdi:garage-variant"
on_press:
then:
- lambda: |-
id(relay_pin_1).turn_on();
delay(200);
id(relay_pin_1).turn_off();
This results in warning in the log:
[16:14:52][W][component:214]: Component api took a long time for an operation (0.20 s).
[16:14:52][W][component:215]: Components should block for at most 20-30ms.
Is there a way to implement such a action without upsetting ESPHome?