My base stack is comparable. I have all sorts of Zigbee devices on an RPI + RaspBee, and Shelly devices behind my wall switches. However, I use Node-RED on top of that. Many things are available as plugin (MQTT, Deconz, daylight, database, web UI, etc) It contains some custom script-nodes, to achieve a 'state' in between inputs and outputs. Now I can just add and change stuff by clicking around in Node-RED.
To me it's a nice combo of 'off the shelf' and maintaining full flexibility.
To me it's a nice combo of 'off the shelf' and maintaining full flexibility.