I'm trying to build a block content based on a water meter device, and two variables content.
I was planning to perform such things in "custom/.js" with something like
Code: Select all
function afterGetDevices(){
var var1 = Domoticz/.getAllDevices()['vVar1'];
var var2 = Domoticz/.getAllDevices()['vVar2'];
var waterMeter = Domoticz/.getAllDevices()['123'];
Dashticz/.setBlock('target_block', {
title: 'Water Left ' + var1/.value + var2/.value - waterMeter/.usage
});
}
Any idea or tips to share please ?