And as for home automation, you can control wall plugs from alexa and home assistant.
Example:
https://sonoff.tech/product/smart-plugs/s26/
I prefers to choose plugs that you can change the firmware to an opensource version (ex. Tasmota).
And you can also add a "presence" detector, Raspberry Pi 4 has Bluetooth and then you can detect when you get home or when your earphone, smart watch or mobile with Bluetooth gets home 😉