updated my dashticz Topic is solved

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:

updated my dashticz

Post by pvklink »

Hi, i updated my dashticz to the latest version, and i get a error
cannot read property value of undefined.
The kw usage of my 2103_1 is displayed when i delete the below function.
When i activate the function i get an error as described...

Code: Select all

function getStatus_2103_1(idx,value,device)
{
if (parseFloat(device.value) >2) 
	{
		blocks['2103_1']['title'] = 'Wasmachine Aan';
		blocks['2103_1']['icon'] = 'fas fa-thermometer-full';
	} 
	
else	{
		blocks['2103_1']['title'] = 'Wasmachine Uit';
		blocks['2103_1']['icon'] = 'fas fa-thermometer-half';
	} 
}
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
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: updated my dashticz

Post by HansieNL »

pvklink wrote: Monday 27 April 2020 15:48 Hi, i updated my dashticz to the latest version, and i get a error
cannot read property value of undefined.
The kw usage of my 2103_1 is displayed when i delete the below function.
When i activate the function i get an error as described...
Spoiler: show

Code: Select all

function getStatus_2103_1(idx,value,device)
{
if (parseFloat(device.value) >2) 
	{
		blocks['2103_1']['title'] = 'Wasmachine Aan';
		blocks['2103_1']['icon'] = 'fas fa-thermometer-full';
	} 
	
else	{
		blocks['2103_1']['title'] = 'Wasmachine Uit';
		blocks['2103_1']['icon'] = 'fas fa-thermometer-half';
	} 
}
Upgrade instructions of version 3.4.1 contains: Breaking change: getBlock, getStatus and getChange interface in custom.js
The examples in Functionality via custom.js https://dashticz.readthedocs.io/en/beta ... -idx-block have been updated.
Blah blah blah
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: updated my dashticz

Post by pvklink »

Hi @HansieNL, thanks!

I think it is working again!
For those who can use it, this is my code to check if my washingamchine is working!

Code: Select all

function getStatus_2103_1(block) 
	{
	var usage = block.device.value;
	if (parseFloat(usage) > 2) 
		{
		block.icon = 'fas fa-thermometer-full'
		block.title = 'Wasmachine Aan'
		} 
	else 
		{
	         block.icon = 'fas fa-thermometer-half'
         	block.title = 'Wasmachine Uit'
     		}
	 }
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