[SOLVED] Access device custom property in Metric widget

Hello,

I added a new property to a device from the device configuration window. This new property is visible under the title ‘properties’ on the left ribbon of the device window. I would like to extract this new property and display it in a’Metric’ widget. I know that you can extract a device name by using {{device.name}} or its label with {{device.label}}. I did a search in the Ubidots API and discovered that the custom properties of a device are in the “context” object of the device. The new property is called a plan. So I tried to extract {{device.context.plan}}} from the Metric widget editor. But nothing is displayed. So my question is: is it possible to extract a custom property using {{…}} in a widget or should we extract it from the API and display it in a Custom Canvas widget?

Thank you: -)

Nobody can answer this question ?

Greetings, the device properties were not available in the new metric widget deployment. The development team has released this feature again and you should be able to access to your device properties in this way: {{device.context.key}}

All the best

Wow ! It works and you know what ? Using this feature, devices can be seen as complete digital twins. You can, for example link a property of a device to an URL where the plan of a machine is hosted. device attribute + device property = digital twin… Wow ! Really great feature ! Thanks !