Is it possible to add a text box on the device page? I tried using label: “‘sample’” while editing device page. but it doesn’t work
What are you trying to accomplish?
i want to add hints, comments
This will meet your needs. Please note, the comments parameter will not show up until you refresh the vparam by either manually refreshing on VirtualParameters
for the device, or by refreshing VirtualParameters.Comments
in a provision script. My suggestion is to put this line in the bootstrap
provision script:
declare('VirtualParameters.Comments', null, {value: 1});
Create a virtual parameter called Comments
with the following
let value;
if ("value" in args[1]) {
// Set declared value
value = args[1].value;
} else if ("value" in args[3]) {
// No declared value, keep current value
value = args[3].value;
} else {
// No current value, use default
value = ['{}', 'xsd:string'];
}
return {writable: true, value: value};
Go to Admin
→ Config
→ Edit device page
and add the following lines (note, indentation is important):
- label: "'Comments'"
parameter: VirtualParameters.Comments
