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.

    Standard Weather Module showing unwanted header

    Scheduled Pinned Locked Moved Solved Troubleshooting
    11 Posts 3 Posters 872 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.
    • karsten13K Offline
      karsten13 @rkorell
      last edited by

      @rkorell said in Standard Weather Module showing unwanted header:

      appendLocationToHeader

      read the docs, there is no property with above name …

      R 3 Replies Last reply Reply Quote 0
      • R Offline
        rkorell @karsten13
        last edited by

        @karsten13 OK, have found this as part of an if clause and as member of defaut configuration in module code.
        If this causes the unwanted behaviour: sorry!

        Thanks.
        Ralf

        1 Reply Last reply Reply Quote 0
        • R Offline
          rkorell @karsten13
          last edited by

          @karsten13 nope :-(
          Deleting “appendLocationToHeader” doesn’t resolve the issue…
          One of the headers (in this case weather_forecast instance) immediatly shows up if I disable the blackness of text/border-bottom …

          Regards,
          Ralf

          1 Reply Last reply Reply Quote 0
          • R Offline
            rkorell @karsten13
            last edited by

            @karsten13 said in Standard Weather Module showing unwanted header:

            there is no property with above name

            the part of module code I’ve meant is obvioulsy doing something wrong:
            getHeader is “explained” as “// Override getHeader method.”

            	getHeader () {
            		if (this.config.appendLocationNameToHeader && this.weatherProvider) {
            			if (this.data.header) return `${this.data.header} ${this.weatherProvider.fetchedLocation()}`;
            			else return this.weatherProvider.fetchedLocation();
            		}
            
            		return this.data.header ? this.data.header : "";
            	},
            

            I’ve simply replaced this with

            
            getHeader () {
            		return "";
            	},
            
            

            And - no surprise - header disappears.

            Regards,
            Ralf

            R 1 Reply Last reply Reply Quote 0
            • R Offline
              rkorell @rkorell
              last edited by

              @rkorell OK, just seen at least one other mistake:
              I’ve picked “appendLocationToHeader” but this should be “appendLocationNameToHeader” …

              R 1 Reply Last reply Reply Quote 0
              • R Offline
                rkorell @rkorell
                last edited by rkorell

                @karsten13 ,
                yupp this seems to do the trick.
                undoing code changes and adding

                appendLocationNameToHeader: false,
                

                to weather config let the header disappear …
                Thanks!

                Ralf

                (not understood why and how but at least this way the header lines are really not present - the blackness idea makes them invisible but they still occupy room.)

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

                  @rkorell the old weather api returned the location Name, and someone decided to show it in the MagicMirror module header field

                  but you can disable this function by setting the config property to false (default true)

                  the v3 api does NOT return the location Name, so you need to set the property to false AND YOU have to set the header manually
                  header:“…”, after the module:“weather”,

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  R 1 Reply Last reply Reply Quote 0
                  • R Offline
                    rkorell @sdetweil
                    last edited by

                    @sdetweil said

                    by setting the config property to false (default true)

                    Dear Sam,
                    Thanks for this.
                    Which one of the config properties are you referencing to?
                    I‘ve set

                    header: „“
                    

                    This definitely doesn‘t work because it‘s overwritten somewhere
                    .
                    Regards,
                    Ralf

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

                      @rkorell said in Standard Weather Module showing unwanted header:

                      Which one of the config properties are you referencing to?

                      appendLocationNameToHeader: false,
                      

                      and for header

                      {
                           module:"weather",
                           header:"something",
                           position:
                           config: {
                             ...
                           }
                      }
                      

                      all of these properies belong to MagicMirror, same for every module
                      https://docs.magicmirror.builders/modules/configuration.html#module-configuration

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      R 1 Reply Last reply Reply Quote 0
                      • R Offline
                        rkorell @sdetweil
                        last edited by

                        @sdetweil said

                        appendLocationNameToHeader: false,
                        

                        Yeah.
                        OK, already found this…

                        Regards,
                        Ralf

                        1 Reply Last reply Reply Quote 0
                        • S sdetweil has marked this topic as solved on
                        • 1
                        • 2
                        • 1 / 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