How to distinguish device types in settings?

I have two DTH files, most of the codes are the same, but there are differences in the settings. After I merge them, the following is the display effect in the settings. How to make the setting interface distinguish the display according to the device type through the conditional statement?

I have tried with “zwaveInfo”, but error report by IDE.

Hi, Chenjun.

The DTH preferences are not dynamic, what you can do is condition the usage of those preferences in the code, for example, to get the Manufacturer of the device, you can use:


It should also work for the device “model”. In the function where you send this configuration to the device, you can condition which ones you’ll send.

Thanks ,I see!

1 Like