A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Module help for variable
-
@rts58 this should work w your code as is
-
That’s what I thought. But it still fires off every two minutes, there must be an error in the logic.
-
Is there something wrong with this:
if (!(this.oldAwayState === awayState) && (this.awayState === 'home'))
maybe they are both not strings or something?
-
@rts58 you can use the dev console and put stops in the code and look at the variables
-
@sdetweil thanks, I’ll give that a try. I’ve been writing the variables to the consol log but it’s not quite as helpful.
-
@rts58 the dev light is only for the module just file ( where getDom() is located)
Debugging the node helper or included scripts needs the console.log. sorry for confusion
-
@sdetweil Thanks, I got it. I needed to get rid of “this”. So the correct test was:
if (!(oldAwayState === awayState) && (awayState === 'home'))