When creating devices with driver:try_create_device call, there are manufacturer and model fields are provided.
How can those fields can be accessed when the device is created, for example from device’s init function?
For zigbee devices, there are device:get_model() and device:get_manufacturer(), which allow to implement can handle for sub drivers.
It seems get_model and get_manufacturer are not available for LAN devices.
Are there any alternatives?
I noticed that json output contains model. That’s interesting, because if I try to print device as a table, I don’t see that field.
It is probably hidden in index metatable.
However, it seems that simple device.model works fine. The only problem with this solution is that I’m not sure, whether I’m allowed to use this undocumented field, as it might be removed in the future versions.
Thanks