Required: Watchdog in ESPHome refreshed by HA

Hi I am looking to control my Central Heating using HA, I have some Sonoff units running ESPhome code

My big worry is if HA hangs of goes off line, the Central heating can get stuck on. I can check Wi-Fi condition in ESP device and turn off relays, I cant run it all in ESPhome as the temperature sensors are not connected directly to the Sonoff.

So can I create a regular timed event in HA that can reset a countdown timer in ESPhome, so when ESPhome times out due to network problem or a dead HA I can turn off my relays

Regards Dave

This condition checks the connection to home assistant:

Create an interval component that regularly checks this condition (every 5 minutes should be sufficient). If it fails turn off your relays: