DIY Programmable relay with voltage sensor and real time clock for Raspberry Pi Pico. It can measure input voltage (max 30v dc) and has a high precision real time clock chip DS3231 (this chip is expensive atm). So you can program your relay based on voltage and/or time. The circuit is powered by 5v-30v dc input and the relay can handle 110v/220v AC up to 6A.
See Wiki for more details