Climate engine support pointers

I’m just trying to pick up some homey development and have an idea to try developing. What I want to do is to create an app that can connect to zigbee devices to do climate control. So the app itself needs to be able to create user defined Climate ‘devices’ that the user can put into rooms, and then allow the user to select which Zigbee devices are in a room as part of that climate device.

So a simple example being the user adds an on/off plug through the app, along with 2 temperature sensors. This creates two user named virtual climate devices the user can interact with, and the app uses the sensors to determine if the plug should be on or off.

So the app controls the Zigbee devices, and the user interacts with virtual devices made up of those.

What I can’t figure out is what API concepts woudl be used in here. I’m assuming I can add drivers for the Zigbee devices my app supports, but does that have to expose those devices to the user or its own virtual devices?