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.

    Input...What do you think?

    Scheduled Pinned Locked Moved Development
    54 Posts 9 Posters 43.1k Views 7 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.
    • cowboysdudeC Offline
      cowboysdude Module Developer @barnosch
      last edited by cowboysdude

      @barnosch said in Input...What do you think?:

      Looks very nice.
      The german translation seems to be wrong ;) and not even added to the MMM-NOAA.js
      Guess your are still in the middle of development.
      Added it myself but it is not working yet.
      Also i would like a 24hours setting, if possible.

      Thansk for your work

      PS: is this correct in the default settings? Guess not.

      show: "F".toLowerCase(), // show F or C Temps
      

      Done… in the config file it’s
      format: "12" or "24"

      testing

      1 Reply Last reply Reply Quote 1
      • B Offline
        barnosch
        last edited by

        Thanks. I already fixed it at my mirror with
        (config was already in 24hours mode)
        changeing this line

        //  time = time.toLocaleString('en-US', { hour: 'numeric',minute:'numeric', hour12: true });
               time = time.toLocaleString('de-DE', { hour: 'numeric',minute:'numeric', hour24: true });
        

        which did the job

        And for the sunset and sunrise i just changed to

        H:mm
        
        

        Ugly and hardcoded but worked for me. with my low programming skills.

        How is the correct way to update the repository via git? I’m kind of new to this stuff.

        cowboysdudeC 2 Replies Last reply Reply Quote 1
        • SnilleS Offline
          Snille Module Developer @cowboysdude
          last edited by

          @cowboysdude Ah, Thank you! Looking good. I’ll pull when I have some time. :)

          If you cant find it, make it and share it!
          Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

          1 Reply Last reply Reply Quote 1
          • cowboysdudeC Offline
            cowboysdude Module Developer @barnosch
            last edited by cowboysdude

            @barnosch said in Input...What do you think?:

            Thanks. I already fixed it at my mirror with
            (config was already in 24hours mode)
            changeing this line

            //  time = time.toLocaleString('en-US', { hour: 'numeric',minute:'numeric', hour12: true });
                   time = time.toLocaleString('de-DE', { hour: 'numeric',minute:'numeric', hour24: true });
            

            which did the job

            And for the sunset and sunrise i just changed to

            H:mm
            
            

            Ugly and hardcoded but worked for me. with my low programming skills.

            How is the correct way to update the repository via git? I’m kind of new to this stuff.

            No you did great but I will put in a fix for it and you can do a git pull later :)

            Ok the fix is in… the time will automatically read your language in the config.js file and adjust itself accordingly… However you will want to keep your sunrise/sunset ‘fix’ for now because I did not change that. :)

            1 Reply Last reply Reply Quote 0
            • P Offline
              planet4 @cowboysdude
              last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • P Offline
                planet4 @cowboysdude
                last edited by

                @cowboysdude Looking forward to this but it should be prognos and not prognås right? In the swedish translation.

                SnilleS 1 Reply Last reply Reply Quote 0
                • SnilleS Offline
                  Snille Module Developer @planet4
                  last edited by

                  @planet4 “Prognås” is my bad… :) Sorry… You are correct. I thought it looked strange. :)

                  If you cant find it, make it and share it!
                  Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                  1 Reply Last reply Reply Quote 1
                  • cowboysdudeC Offline
                    cowboysdude Module Developer @barnosch
                    last edited by

                    @barnosch said in Input...What do you think?:

                    Thanks. I already fixed it at my mirror with
                    (config was already in 24hours mode)
                    changeing this line

                    //  time = time.toLocaleString('en-US', { hour: 'numeric',minute:'numeric', hour12: true });
                           time = time.toLocaleString('de-DE', { hour: 'numeric',minute:'numeric', hour24: true });
                    

                    which did the job

                    And for the sunset and sunrise i just changed to

                    H:mm
                    
                    

                    Ugly and hardcoded but worked for me. with my low programming skills.

                    How is the correct way to update the repository via git? I’m kind of new to this stuff.

                    Ok so it’s all updated.

                    As I said above the time zone will adjust automatically and to show the AM/PM on the Sunrise/Sunset time is now a config option [See Readme on Github].

                    To update go to:

                    ~MagicMirror/modules/MMM-NOAA
                    type: git pull

                    That should update for you ;)

                    SnilleS 1 Reply Last reply Reply Quote 0
                    • SnilleS Offline
                      Snille Module Developer @cowboysdude
                      last edited by

                      @cowboysdude Hmm… I’m thinking maybe you are working double here… There should be a “global” locale variable you can use. That’s set in the top of the config file. You should be able to use that one some how. I just don’t know how. :)

                      If you cant find it, make it and share it!
                      Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                      cowboysdudeC 1 Reply Last reply Reply Quote 0
                      • cowboysdudeC Offline
                        cowboysdude Module Developer @Snille
                        last edited by cowboysdude

                        @Snille said in Input...What do you think?:

                        @cowboysdude Hmm… I’m thinking maybe you are working double here… There should be a “global” locale variable you can use. That’s set in the top of the config file. You should be able to use that one some how. I just don’t know how. :)

                        Not sure either :) So what I did was to use the ‘language’ and ‘format’ from the top of the config.js file because it was there … HAHA. So I took advantage of this:

                        language: 'en',
                        timeFormat: 12,
                        units: 'imperial'
                        

                        If something comes to mind please feel free! Always looking for a better way :) Honestly I dislike making config options … too many is not a good thing I think.

                        strawberry 3.141S 1 Reply Last reply Reply Quote 0
                        • strawberry 3.141S Offline
                          strawberry 3.141 Project Sponsor Module Developer @cowboysdude
                          last edited by

                          @cowboysdude you can access the global config by config.timeFormat instead of the local module config this.config.timeFormat

                          Please create a github issue if you need help, so I can keep track

                          cowboysdudeC 1 Reply Last reply Reply Quote 2
                          • cowboysdudeC Offline
                            cowboysdude Module Developer @strawberry 3.141
                            last edited by cowboysdude

                            @strawberry-3.141 said in Input...What do you think?:

                            config.timeFormat

                            Thank you for that!!! One config option gone :) There now the time function is all automatic :) ALL controlled by the users input here:

                                language: 'en',
                                timeFormat: 12,
                            

                            Ok I’ve had my tea and toast so I must head out the door for the day :)

                            1 Reply Last reply Reply Quote 0

                            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
                            • 1
                            • 2
                            • 3
                            • 3 / 3
                            • 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