Read the statement by Michael Teeuw here.
Help again...
-
How do I differentiate between the two different compliment purposes in the congif.js?
Do I use the “/n” to split them?
-
@smart_user two completely different setups
{ module: 'compliments', position: 'middle', config: { compliments:...... } }, { module:'compliments', position:'bottom', config:{ compliments:..... } } -
@sdetweil The display is showing an “undefined” with a line
-
-
@sdetweil after adding the header all I see is the line. The “undefined” is not there
-
@smart_user u did define the compliments data , right?
here is the default, if you remove the compliments: value completely from the config section
from https://docs.magicmirror.builders/modules/compliments.html#configuration-optionsDefault value: config: { compliments: { anytime: [ "Hey there sexy!" ], 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!" ], "....-01-01": [ "Happy new year!" ] } } -
@sdetweil ummmmm I’m not sure? By that do you mean in the compliments.js?
-
@smart_user no… in config.js … NEVER edit the module source
{ disabled:false, module: "compliments", position: "middle" }, { disabled:false, module: "compliments", position: "lower_third" }, -
My config.js file:
{
module: “compliments”,
position: “lower_third”
},{
module: “compliments”,
header: ‘’,
position: “middle”,config:{
compliments: “Did you do the laundry?”
} -
@smart_user the compliments thing in then module config block is an object
compliments: { }it chooses by time of day, so you need some of the time ranges… see the default in the doc
morning/afternoon/evening…
each of those is a list [] (array), even if only one entry
The compliments property contains an object with at least four arrays: morning, afternoon, evening and anytime -
These are what they already look like:
defaults: {
compliments: {
anytime: [“Make today worth it!”],
morning: [“Good morning!”, “Have a wonderful day”, “It’s your day today!”],
afternoon: [“You can do this”, “Take a small nap”, “Enjoy your meal”],
evening: [“Exercise time!”, “NO PAIN NO GAIN!”, “Well done for the day!”],
“…-01-01”: [“HAPPY NEW YEAR!”],
“…-12-25”: [“MERRY CHRISTMAS!”] -
@smart_user but u edited the code.
the way to do this is to put that definition in config.js
-
@smart_user the way you are supposed to do it is in config.js
{ module: “compliments”, position: “lower_third” config: { compliments: { anytime: [“Make today worth it!”], morning: [“Good morning!”, “Have a wonderful day”, “It’s your day today!”], afternoon: [“You can do this”, “Take a small nap”, “Enjoy your meal”], evening: [“Exercise time!”, “NO PAIN NO GAIN!”, “Well done for the day!”], “…-01-01”: [“HAPPY NEW YEAR!”], “…-12-25”: [“MERRY CHRISTMAS!”] } } }, { module: “compliments”, header: ‘’, position: “middle”, config:{ compliments: { anytime: [“Make today worth it!”], morning: [“Good morning!”, “Have a wonderful day”, “It’s your day today!”], afternoon: [“You can do this”, “Take a small nap”, “Enjoy your meal”], evening: [“Exercise time!”, “NO PAIN NO GAIN!”, “Well done for the day!”], “…-01-01”: [“HAPPY NEW YEAR!”], “…-12-25”: [“MERRY CHRISTMAS!”] } } }and u leave the original code untouched. this way we can change the code, without impacting your configuration
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login