Page 1 of 1

Change dial property by procedure

Posted: Tuesday 16 May 2023 12:18
by pvklink
Hi ,

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,
				}
			
				
And trying to change the title of this dial by a procerdure (is a stripped version, without conditions etc.)
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 '});
	}