Page 4 of 4

Re: Dashticz - Function - Trigger action on specific value

Posted: Monday 26 June 2017 10:13
by EdwinK
I use idx 'XX_1' for the first and 'XX_2' for the second

Re: Dashticz - Function - Trigger action on specific value

Posted: Monday 26 June 2017 10:44
by htilburgs
Can you try changing Data into Temp (in your Config.js code)?

Re: Dashticz - Function - Trigger action on specific value

Posted: Thursday 14 September 2017 11:07
by woody4165
Hi

This is a very powerful feature, just discovering.

I would like to color the Netatmo Thermostat SetPoint when boiler is on, so when SetPoint Temp is higher than Temp measured by sensor.

The two values are a different.

From SetPoint I can use
"Data" : "18.0",
"SetPoint" : "18.0",

From Sensor I can use
"Data" : "23.2 C",
"Temp" : 23.199999999999999,

What kind of comparison I can use ?
I'm a little bit confused...

Thanks

Re: Dashticz - Function - Trigger action on specific value

Posted: Monday 08 January 2018 5:36
by Wob76
Hi,

Just wondering if it is possible to use getstatus to monitor a User Variable from Domoticz? I am using a few User Variables in scripts and would like to colour some tiles based on those variables status, if not I'll have look at incorporating some switches into the scripts.

Thanks,
Wob

Re: Dashticz - Function - Trigger action on specific value

Posted: Monday 08 January 2018 21:54
by robgeerts
I think you need switches with the value of the user-variable.
BUT, I think you can hide these switches so you wont see them ;)
Something like (if the switch you want to check is 1 and block you want to colour is idx 2)

Code: Select all

function getStatus_1(idx,value,device){
	$('div.block_1').hide();
		if(device['Data']=='somevalue'){
			$('div.block_2').addClass('warning');
		}
		else {
			$('div.block_2').removeClass('warning');
		}
	
}

Re: Dashticz - Function - Trigger action on specific value

Posted: Tuesday 09 January 2018 2:47
by Wob76
Thanks, I thought that might be the case, I have plenty of other hidden switches :) and the user variable is just a 0/1 state, so easy enough to change it to use switches.

Re: Dashticz - Function - Trigger action on specific value

Posted: Tuesday 09 January 2018 6:18
by Wob76
Ok, my problem now is that I want to have the switch hidden in Domoticz, so prefix it with a $, but it seems these switches are filtered upstream somewhere and will not show in Dashticz, is there a way to have it hidden in both interfaces?

Re: Dashticz - Function - Trigger action on specific value

Posted: Tuesday 09 January 2018 11:16
by DewGew
Wob76 wrote: Tuesday 09 January 2018 6:18 Ok, my problem now is that I want to have the switch hidden in Domoticz, so prefix it with a $, but it seems these switches are filtered upstream somewhere and will not show in Dashticz, is there a way to have it hidden in both interfaces?
I place my hidden devices in a hidden room also. Now you can only find theese device under settings/devices and room manager. You create hidden room with name starts with $ (eg. $roomtohide).

Re: Dashticz - Function - Trigger action on specific value

Posted: Tuesday 09 January 2018 11:33
by Wob76
Thanks for the tip, I have done that in past, but for some reason Domoticz is no longer hiding devices in hidden rooms from my All tab, I'll have to investigate.

Update:
Maybe a bug in the beta versions of Domoticz, and new room I create with a $ doesn't seem to work, devices in those rooms still show in the All Room, I have a few old ones that seem to work, but only for the devices already in there, if I add a new device to one it still shows in All. :(

I tried adding the devices into "$Hidden Devices" and removing the $ from the name, but again they are filtered from Dashticz,the above code works if I move it out of $Hidden Devices, But I do have to have the switch configured for a row and then hide it.

Re: Dashticz - Function - Trigger action on specific value

Posted: Tuesday 06 August 2019 13:35
by t3v3h
Hi Guys,

I would liket to change the color of the icon with this method, but I cannpot figure out what to put in css...
this one is not working:

.warning {
.fas.fa-sun {color:orange;}
}

Any idea?

Thanks,
t

Re: Dashticz - Function - Trigger action on specific value

Posted: Tuesday 06 August 2019 14:53
by Lokonli
If you just want to change the color of the sun icon, then the following should work:

Code: Select all

.fa-sun {color:orange !important;}
}
if you want to change the icon color depending on the state of a switch, have a look here:
https://dashticz.readthedocs.io/en/late ... icz-switch

If you want to change the icon depending on the value of a device, first have a look here:
https://dashticz.readthedocs.io/en/late ... lue-device

Attach a class (for instance warning) to a whole block via the getStatus_xxx function in custom.js, and use a class selector in custom.css to change the color of the item you want to change. Something like:

Code: Select all

.warning .col-icon {
   color: orange !important
}

Re: Dashticz - Function - Trigger action on specific value

Posted: Tuesday 06 August 2019 16:11
by t3v3h
Lokonli wrote: Tuesday 06 August 2019 14:53
Attach a class (for instance warning) to a whole block via the getStatus_xxx function in custom.js, and use a class selector in custom.css to change the color of the item you want to change. Something like:

Code: Select all

.warning .col-icon {
   color: orange !important
}
Great, thanks a lot!