FlyingDiver wrote:If I have a single Indigo device with multiple sub-models, the only way to have different state items depending on the sub-model is by using getDeviceStateList and adding the new states to the base list obtained from self.devicesTypeDict[typeId][u'States'].
Yes, but you also need to call
stateListOrDisplayStateIdChanged. Not sure if you've seen it, but
this thread has details about dynamically specifying states for device instances. Note that getDeviceStateList gets called by Indigo when showing UI that has states (Triggers, Conditionals, Control Page controls) so your plugin has to have the smarts to always return the states you want for any given instance. That is, although the states themselves are saved off into the database the UI information about the states are not and thus getDeviceStateList gets called more often than just on device creation.
FlyingDiver wrote:As best I can tell, there's no way to have a device type( <Device type="custom" id="HiddenDevice">) that I can create devices on the fly but will NOT show up in the "Model:" popup in the device creation dialog.
Correct, no way to do that currently. Factory devices can do this but they totally do away with the model popup being user editable. It sounds like you might be looking for a hybrid where there still is a device model popup but it doesn't show all of the devices. You might see if you can convert over to using the factory technique. There is an SDK plugin example. You still define all the device types and their states in the XML, but you dynamically determine which devices are created inside the factory UI dialog. This is what the Z-Wave plugin does.