I've designed and fabricated light and temperature sensors that I've placed in every room, and lights are controlled by a combination of Sonoff switches (they're great, I've written my own firmware for them (https://gitlab.com/stavros/sonoff) and YeeLight lamps (I've written my own library and cli client: https://yeelight.readthedocs.io/en/latest/, https://gitlab.com/stavros/yeecli/).
My sensor boards (https://github.com/skorokithakis/esplights) can also output RF and IR so I can control various devices in the room, like TVs and ACs. I've hooked this all up to a small Python script that talks to the devices over an MQTT server, separated the network for all this crap into a vlan with no access anywhere (other than the MQTT server and the OTA firmware upgrade server), and now I can successfully sound like a lunatic with way too much free time on the internet.