Sonoff SV Door Lock (Electric Strike)


I am using a Sonoff SV with ESPhome to control an electric strike.

Could anyone please assist me with the Yaml config to complete the following.

A single button in HA that will allow me to open the lock for 10 seconds then lock again automatically.
I need it to report that the lock is open when the relay is active and locked when the relay is off.

I had this working previously with Tasmota but have decided to switch ESPhome to move away from MQTT.

Any assistance will be greatly appreciated.

Thank you

I would look at an ESPHome GPIO switch.

As an on_turn_on action you can wait 10secs then turn itself off.