I need to have the endpoint id for future calculations something like device.fingerprinted_endpoint_id
this value should be fast and easily readable as it’s part of many functions.
should I use
local function first_button_ep(device)
return device:get_field("first_button_ep")
end
If you made the endpoint to component association as documented at the Zigbee libraries / Multi-Component devices, you should be able to easily query any endpoint dynamically.
Also, to have a better context, can you share more details about the implementation you’re trying to achieve?