I have a table in global_data that looks like this:
Code: Select all
harmony = {
poweroff = {
['name']='PowerOff',
['índex']=10,
['lightscene']='video'
},
television = {
['name']='Televisie',
['índex']=20,
['lightscene']='video'
}
}
I can call it with:
Code: Select all
domoticz.log (domoticz.helpers.harmony.television.lightscene)
Code: Select all
domoticz.helpers.harmony().forEach(function(test)
domoticz.log (test.name)
end)
Code: Select all
2018-06-25 16:01:54.123 Status: dzVents: Error (2.4.6): Harmony set Domoticz: ...moticz/scripts/dzVents/scripts/harmony_V-0-0-2-alpha.lua:101: attempt to call field 'harmony' (a table value)
Ralph