That’s why you need a Home Hub. A hub is an Apple device that stays at home and is always on. It will contain a copy of your HomeKit and can control your accessories and run automations. A hub can be an Apple TV (4th generation or later), an iPad or a HomePod.
To use this iPad as a Home Hub, it needs to be connected to power all the time. You can make an iPad a Home Hub via settings: