MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. j.e.f.f
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    J
    Offline
    • Profile
    • Following 0
    • Followers 22
    • Topics 27
    • Posts 681
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

      @miniashman A couple of ways, yes:

      By default, the animated icon set is used for the large icon beside the current temperature. I’ve found from my testing that sometimes this the code calls for the icon to render before it is ready to do so, and just shows up blank as you see above. There is a configuration parameter to add a delay to animated icon rendering. Use it in your config as follows:

      ...
        animatedIconStartDelay: 1500,
      ...
      

      This parameter defaults to 1000 (milliseconds) so it looks like you’ll need to experiment with numbers larger than that.

      Alternatively If you don’t care about the animated icon, then you can turn it off altogether in your config:

      ...
        useAnimatedIcons: false,
      ...
      

      This will use the static icon set for everything, and you won’t need to play around with the animatedIconStartDelay config parameter.

      posted in Utilities
      J
      j.e.f.f
    • RE: MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

      @swvalenti unfortunately, the provider has put “Special weather statement” into the title field and the actual title as part of the description. To get that to show a different colour it would require extra processing to split on the ... character.

      Having seen a few weather alerts from other regions I can say it’s not commonly done the same way as yours. I don’t know what might break as a result of formatting that way for you.

      If you’re up for it, you can modify my code for your needs. Most of this prefornatting is in the main MMM-OpenEeatherForecast.js file

      posted in Utilities
      J
      j.e.f.f
    • RE: MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

      @blackeaglece that’s not my weather module. You’re using a different one. Not sure which.

      posted in Utilities
      J
      j.e.f.f
    • RE: MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

      @0m4r Yes indeed!

      @motdog the more I think about it, it makes sense that the issue you’re seeing is a result of the missing minus sign in your longitude. Essentially, you’re shifting what you’re expecting by exactly 12 hours, meaning that when it’s noon in Kansas city, it’s midnight in Shanghai, hence moving to the next day, and explains why your dailies are shifting by one after 12:00 pm for you.

      posted in Utilities
      J
      j.e.f.f
    • RE: MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

      @0m4r Still troubleshooting this. I don’t see this happening when I use my own long/lat. Will try with yours, but I will need to wait until it ticks past 12:00pm your time. (I’m in London, so will need to check later this evening).

      One thing I did notice, though… the long lat you have in your config is for Shanghai, China, not Kansas City. You forgot the “minus” sign in front of the longitude property. Maybe that fixes it?

      posted in Utilities
      J
      j.e.f.f
    • RE: MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

      @0m4r If it is then it’s a bug in the API. The API is supposed to return all data time shifted to the time zone for the long/lat you specify.

      I should know more soon. Running a test right now and just waiting for the clock to tick past noon.

      posted in Utilities
      J
      j.e.f.f
    • RE: MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

      @motdog let me look into this. My code assumes the first daily forecast is “today” and starts with the second one in the collection. It’s possible this is something the API does and I just hadn’t noticed before. It would make sense because I’ve typically worked on this module during the morning. Will test later.

      posted in Utilities
      J
      j.e.f.f
    • RE: MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

      @swvalenti said in MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast:

      Last thing is it possible to just get the red to display and nothing else?

      Yes, you can do this in your custom.css file.

      To hide the description and alert source:

      .MMM-OpenWeatherForecast .weather-alert .weather-alert-description,
      .MMM-OpenWeatherForecast .weather-alert .weather-alert-source {
          display: none;
      }
      

      To change the size of the red title text:

      .MMM-OpenWeatherForecast .weather-alert .weather-alert-title {
         font-size: 17px; /* adjust this */
      }
      

      alternatively, to change the size of the alert icon:

      .MMM-OpenWeatherForecast .weather-alert {
          background-size: 30px 26px;  /* width height */
          background-position: 6px 10px;  /* top left */
      }
      

      If you change the size of the icon, you may want to adjust the title padding as well:

      .MMM-OpenWeatherForecast .weather-alert .weather-alert-title {
        padding-left: 36px; /* adjust this */
      }
      

      EVERYTHING is in this module has a CSS class applied to it so you can tailor every last little bit to your specific needs. Take a look at MMM-OpenWeatherForecast.css for existing CSS rules and mmm-openweather-forecast.njk to see what classes have been applied to which UI elements.

      posted in Utilities
      J
      j.e.f.f
    • RE: MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

      @mielu80 said in MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast:

      It is somehow possible to show the unit of measurement for the temperature (in my case, “C” for Celsius) ?

      Yes. You can do that in your custom.css file.

      For the big current temperature display:

      .MMM-OpenWeatherForecast .current-conditions-wrapper .current.temperature:after {
          content: "C";
      }
      

      In the extra current conditions Hi/Lo display:

      .MMM-OpenWeatherForecast .extra-current-conditions-wrapper  . temperature-container . high-temperature:after,
      .MMM-OpenWeatherForecast .extra-current-conditions-wrapper  . temperature-container . low-temperature:after {
          content: "C";
      }
      

      In the hourly forecast items:

      .MMM-OpenWeatherForecast .forecast-item.hourly .temperature-container:after {
          content: "C";
      }
      

      In the daily forecast Hi/Lo display:

      .MMM-OpenWeatherForecast .forecast-item.daily .high-temperature:after,
      .MMM-OpenWeatherForecast .forecast-item.daily .low-temperature:after {
          content: "C";
      }
      

      In all of the examples above, whatever you specify for content will be displayed. So if you wanted F for Fahrenheit, you would specify content: "F";

      posted in Utilities
      J
      j.e.f.f
    • RE: MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

      @swvalenti I’ve made a modification that now truncates alerts to no more than 3 lines of description. This is controlled with CSS so if you’ve like to adjust this for more or less lines, you can do so in your custom CSS file as follows:

      .MMM-OpenWeatherForecast .weather-alert .weather-alert-description {
        -webkit-line-clamp: 3; /* adjust this as desired */
      }
      

      do a git pull in your installed MMM-OpenWeatherForecast directory to get the latest code.

      posted in Utilities
      J
      j.e.f.f
    • 1
    • 2
    • 3
    • 4
    • 5
    • 68
    • 69
    • 3 / 69