Ik like to dynamically change the title of a dial.
I made the following dial
Code: Select all
blocks['p1_electra'] = {
idx: 3079,
title: 'Electra gebruik',
width: 4,
type: 'dial',
subtype: 'usage',
inverted: true,
isSetpoint: false,
isNeedle: true,
showring: true,
showunit: true,
shownumbers: true,
showvalue: true,
values: [
{idx: 3089, label: 'Gebruik', unit: 'Watt'}, // of Data0 unit kwh Watt
{idx: 3090, label: 'Levering', unit: 'Watt'}, // of Data0 unit kwh Watt
],
color: 'white',
flash: false,
last_update: true,
decimals: 0,
animation: false,
fixed: false,
hide_data: true,
min: -5000,
max: 5000,
}
But no success so far, do these procdedure work for a special block like dials ?
Code: Select all
function getStatus_p1_electra(block)
{
block.title = 'x1'
Dashticz.setBlock('p1_electra', {title: 'x2 '});
}