HomeKit is an outlier in that it’s supported on the Mac but only for Mac Catalyst apps.
FYI, while the sample project "Interacting with a home automation network" does not include a specific Mac Catalyst destination, the project can easily be updated to include it. You'll get one build error in its "tapAddAccessory" method, but that error is because Mac Catalyst does not include "addAndSetupAccessories". You can clear that error by simply deleting that code, after which the sample will build and run fine.
As a side note, this sample is VERY useful as a general development helper, particularly when run on the Mac. It shows you the full HomeKit layout and configuration of every accessory in the target home, which makes it easier to figure out how an accessory is configured and controlled. It also lets you see that "raw" configuration at the same time your app is interacting with it, which can help investigating and debugging any issues.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware