If you’re comfortable with Arduino, get some $5 Sonoff switches and flash them with custom firmware.
I found openHAB much easier to setup with my zwave devices, DCS security integration, stereo controls, and custom actions based on external data (I have security cameras running through OpenCv that fire alerts)
Also openhab supports MQTT so you could even integrate home assistant and openhab together!
It’s all self-made and most of it is self programmed and hosted on whatever hack solutions they use, and they mainly use YouTube videos for DIY electronics to make it happen.
Like I said, not that informative for a HN reply, but I would start there.
I tried several open source solutions but they just needed to much work or upgrading broke stuff. Nog good for the WAF.
I started using Home Assistant a year ago and it has become a fun hobby.