Hi everyone,
I have an app that I’m working on, to turn on/off my house’s lights randomly when I’m away.
Here’s the current code:
During initialize()
, my app creates a state.groups = [:]
array. Each item in the list is an object with properties such as .lights
, .enabled
, .on
, etc.
initialize()
calls loop()
for the first time, and everything looks good – debug logging shows my state.groups
array is working:
[0:[lights:[Living Room Lights], enabled:true, start:1462882380000, end:1462896120000, on:true], 1:[lights:[group2Lights], enabled:false], 2:[lights:[group3Lights], enabled:false], 3:[lights:[group4Lights], enabled:false]]
I then runEvery5Minutes(loop)
.
However, when loop()
starts 5 minutes later, the state.groups
array is now null:
log.debug state.groups
// null
What gives?
Note in the dashboard, I see STATE: INCOMPLETE
, which I don’t know what that means: