Read the statement by Michael Teeuw here.
MMM Compliments
-
You don’t use the
"
marks around the numbers.so :
updateInterval: 90000, morningStartTime: 3, morningEndTime: 12, afternoonStartTime: 16, afternoonEndTime: 20, eveningStartTime: 20, eveningEndTime: 23,
-
@broberg OMG I will try ASAP that it was so easy I would not have thought! Thank you for the quick help!
-
hmm i just changed it from " " to , after the numbers, after a reboot i got a message for afternoon, so it showed no changes.
Do I have to change anything? -
@Kollen the code says
if current hour is between morning start/end, then use from morning list
else if current hour is between afternoon start/end then use afternoon list,
else use evening list if presentthe default times are
morningStartTime: 3, morningEndTime: 12, afternoonStartTime: 12, afternoonEndTime: 17
if (hour >= this.config.morningStartTime && hour < this.config.morningEndTime && this.config.compliments.hasOwnProperty("morning")) { compliments = this.config.compliments.morning.slice(0); } else if (hour >= this.config.afternoonStartTime && hour < this.config.afternoonEndTime && this.config.compliments.hasOwnProperty("afternoon")) { compliments = this.config.compliments.afternoon.slice(0); } else if(this.config.compliments.hasOwnProperty("evening")) { compliments = this.config.compliments.evening.slice(0); }
it then adds the current weathertype
it then adds the anytime list
then takes a random selection of all thosewhat time was it when u tested?
-
Looking at the code you only have morning start and end, and afternoon start and end.
so eveningStartTime & eveningEndTime does nothing.
So basically the time between
afternoonEndTime
andmorningStartTime
is considered evening.
Anything put inanytime
-compliments will be shown regardless of time.So if you really want to test it then remove the compliments from anytime and just run 2 morning, 2 afternoon and 2 evening compliments (alter the times you see it change)
{ module: "compliments", position: "lower_third", config: { updateInterval: 90000, morningStartTime: 14, morningEndTime: 15, afternoonStartTime: 15, afternoonEndTime: 16, compliments: { anytime: [ "anytime", ], morning: [ "morning1", "morning2", ], afternoon: [ "afternoon1", "afternoon2", ], evening: [ "evening1", "evening2", ] } } },