compliments module with currentweather doesn't work
-
i hope someone can help me on this one.
i want to change the compliments config to work with the currentwheater.
i added this to the config.js, but it wont start up right now.{ module: 'compliments', position: 'lower_third' config: { compliments: { day_sunny: [ 'It\'s a beautiful day', 'Het is een mooie dag' ], snow: [ 'Brrr sneeuw?' ], rain: [ 'Neem een paraplu mee!', 'bah regen' ] } } },
this is done following the readme file thats provided with in the compliments folder.
https://github.com/MichMich/MagicMirror/tree/master/modules/default/complimentsi hope someone can tell me what i did wrong.
-
@joelpfeiffer said in compliments module with currentweather doesn’t work:
i hope someone can tell me what i did wrong.
Try a comma after the last ] so it looks like this --> ],
-
@joelpfeiffer it’s not well documented, you have to define morning afternoon and evening as well.
otherwise you will get an error in console saying
compliments.js:114 Uncaught TypeError: Cannot read property 'push' of undefined
@Mykle1 you should not add commas at the end
-
@strawberry-3.141 said in compliments module with currentweather doesn’t work:
@Mykle1 you should not add commas at the end
I should give up trying to help. Thanks for setting me straight, again.
-
@Mykle1 no worries you will get in
-
@strawberry-3.141 oke thanks for this info.
i will try to make it work by defining moring, afternoon and evening. -
now i tried to define morning, afternoon en evening using the config sample in the readme file.
this doesnt work either.
is there somebody who got this working that maybe able to help?config: { compliments: { morning: [ 'Good morning, handsome!', 'Enjoy your day!', 'How was your sleep?' ], afternoon: [ 'Hello, beauty!', 'You look sexy!', 'Looking good today!' ], evening: [ 'Wow, you look hot!', 'You look nice!', 'Hi, sexy!' ] } }
-
@strawberry-3.141 said in compliments module with currentweather doesn’t work:
@joelpfeiffer it’s not well documented, you have to define morning afternoon and evening as well.
otherwise you will get an error in console saying
compliments.js:114 Uncaught TypeError: Cannot read property 'push' of undefined
So, there a bug here. I can review and see a fix that if no other people is interested.
-
@roramirez said in compliments module with currentweather doesn’t work:
So, there a bug here. I can review and see a fix that if no other people is interested.
I reply myself.
This is already fixed in the develop branch. You can see
https://github.com/MichMich/MagicMirror/commit/cbafaf5d5614e255e6a0babf7966e262fcc612bcPS: Perhaps this type of things is better notice by an issue in Github.