Code: Select all
return {
-- global persistent data
data = {
OWMForecast = {},
kelvinBuiten = {},
hueScenes = {},
sceneWoonkamerStatus = { initial = 'Auto' }
},
helpers = {
-- SYSTEEM
idxNachtstand = 153,
-- KAMERS
-- woonkamer
idxBewegingWoonkamer = 2500,
idxLuxWoonkamer = 2502,
idxTempWoonkamerOog = 2508,
idxTempWoonkamerRookmelder = 5149,
idxThermostaatDagstandWoonkamerVirtual = 5131,
idxThermostaatNachtstandWoonkamerVirtual = 3127,
idxModusWoonkamerRadiatorknop = 5117,
}
}
A lot of my scripts start like this:
Code: Select all
local domoticz = require("global_data")
local idxLuxWoonkamer = domoticz.helpers.idxLuxWoonkamer
local idxNachtstand = domoticz.helpers.idxNachtstand
local idxBuitengroep = domoticz.helpers.idxBuitengroep
local idxMuggenlamp = domoticz.helpers.idxMuggenlamp
return {
on = {
devices = {
idxLuxWoonkamer
},
timer = {
"every minute"
et cetera
Code: Select all
-- local domoticz = require("global_data")
local idxLuxWoonkamer = 2502
local idxNachtstand = 153
local idxBuitengroep = 10
local idxMuggenlamp = 5233
return {
on = {
devices = {
idxLuxWoonkamer
},
timer = {
"every minute"