MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Help again...

    Scheduled Pinned Locked Moved General Discussion
    15 Posts 2 Posters 2.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      smart_user
      last edited by

      My config.js file:
      {
      module: “compliments”,
      position: “lower_third”
      },

      {
      module: “compliments”,
      header: ‘’,
      position: “middle”,

      config:{
      compliments: “Did you do the laundry?”
      }

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @smart_user
        last edited by sdetweil

        @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
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          smart_user
          last edited by

          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!”]

          S 2 Replies Last reply Reply Quote 0
          • S Offline
            sdetweil @smart_user
            last edited by

            @smart_user but u edited the code.

            the way to do this is to put that definition in config.js

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @smart_user
              last edited by sdetweil

              @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

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • 1
              • 2
              • 2 / 2
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy