.filter pattern and functions
Posted: Thursday 14 September 2017 14:04
Ciao,
I'm approaching dzVents and it's simply fantastic...
I have a doubt about the .forEach function and the search pattern in case of browsing common devices...
example...
I have my BLE devices that have the profix NUT_ so, at the moment I found them with
but I'm wondering there is the possibility to use or create a different way like
is it possible... and if so how, to create function within the Execute section?
like
thanks
ciao
M
I'm approaching dzVents and it's simply fantastic...
I have a doubt about the .forEach function and the search pattern in case of browsing common devices...
example...
I have my BLE devices that have the profix NUT_ so, at the moment I found them with
Code: Select all
domoticz.devices().forEach(function(device)
if (device.name:sub(1,4) == 'NUT_') thenCode: Select all
domoticz.devices().forEach(device).filter(.name:sub(1,4) == "NUT_')is it possible... and if so how, to create function within the Execute section?
like
Code: Select all
function retTrue():
return true
print(tostring(retTrue))
ciao
M