Change dial property by procedure

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Change dial property by procedure

Post 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 '});
	}

Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest