Create a “helper” input_boolean and make another automation observe it’s state changes, calling either automation.turn_on or automation.turn_off service.
Automate the switches directly in home assistant. Write a script and call it from a button action, or write an automation. This assumes that relay2 is exposed to home assistant.
Import an input boolean into esphome as a binary sensor and trigger off that (on_press) in esphome when it is switched in Lovelace.
one rectification…
this automation in progress every day at the specified time.
I want to stop/start execute automation by switch (turn switch ON - relay2 turns on every day at the specified time; (turn switch OFF - stops automation execution)