I was able to get the Occupancy Sensor to work as expected. It isn’t exactly the functionality I’m interested in but it gives me a solid starting point to work on a custom device. I think my problem originated from the following:
- Confusion about switches. I want the device to control to send on/off messages to zigbee2mqtt, not the other way around.
- Although the example scripts are relatively simple, I have trouble tracing and following all the nested include files. They’re not well commented so it’s a struggle trying to understand the various classes and definitions they contain.
- The external converters were not properly constructed.