At the moment, in my under development plugin to link to Hubitat, I have created a number of devices in devices.xml, each with a device type such as relay, thermostat, sensor etc.
I was wondering if it is possible just to define one device type i.e. custom with all the properties associated with the other device types and just switch on the properties specific to a particular device type. Then when the device is created, to dynamically change the device type from custom to say relay?
I think the device type needs to be specific as a number of other plugins check for specific device types, e.g. Occupatum for sensors with on/off. I want the linked Hubitat devices to work with existing plugins as if they were native Indigo devices.
At the moment I am only creating one device per Hubitat device but I think a number of devices would benefit from using the Factory model which would be more Indigo like.
Is the removal of the User
At the moment, the devices defined in devices.xml share a lot of common fields e.g. selecting hub and device, listing properties of the device and selecting which ones to enable. This means a lot of cutting and pasting when things are changed as the plugin is developed.
I suspect the answer is going to no, but thought I would ask.