Can a device handler become different things?

For example, there are a few different uses for your standard door sensor - the ones with contacts that can be used, like Ecolink for example, can be used for just about anything and there are specific examples of tieing in both smoke detectors and carbon monoxide detectors with them. In that case, each tie-in has to have a separate DTH configured for the specific functionality.

So my question is whether it’s possible to have one device handler that could be configured on-the-fly to become different things, ie a smoke detector, a door/window sensor, or a carbon monoxide detector.

And, as a corollary, if a device has a configuration to set “Notification Type”, what exactly does this do?

I do not think you can modify the device capabilities on the fly, it is predefined by the capabilities and (custom) commands and attributes. You can however define all those capabilities to a device handler. Those capabilities then give you attributes and commands. You need to act on events and commands in that single device handler…

1 Like

I had seen this but only thought of it as a virtual device. I’ll have to look closer to see if I can use what’s here to apply to a physical device.