Read the statement by Michael Teeuw here.
Let it snow now Magic Mirror
-
@cgillinger Nice! Don’t forget to add it to the module list. And please add a screenshot 🙂❄️
-
@cgillinger weather sends 2 different broadcasts
1 for current weather
if (this.weatherProvider.currentWeather()) { this.sendNotification("CURRENTWEATHER_TYPE", { type: this.weatherProvider.currentWeather().weatherType.replace("-", "_") }); }
and 1 for all the weather info
const notificationPayload = { currentWeather: this.config.units === "imperial" ? WeatherUtils.convertWeatherObjectToImperial(this.weatherProvider?.currentWeatherObject?.simpleClone()) ?? null : this.weatherProvider?.currentWeatherObject?.simpleClone() ?? null, forecastArray: this.config.units === "imperial" ? this.weatherProvider?.weatherForecastArray?.map((ar) => WeatherUtils.convertWeatherObjectToImperial(ar.simpleClone())) ?? [] : this.weatherProvider?.weatherForecastArray?.map((ar) => ar.simpleClone()) ?? [], hourlyArray: this.config.units === "imperial" ? this.weatherProvider?.weatherHourlyArray?.map((ar) => WeatherUtils.convertWeatherObjectToImperial(ar.simpleClone())) ?? [] : this.weatherProvider?.weatherHourlyArray?.map((ar) => ar.simpleClone()) ?? [], locationName: this.weatherProvider?.fetchedLocationName, providerName: this.weatherProvider.providerName }; this.sendNotification("WEATHER_UPDATED", notificationPayload);
-
@KristjanESPERANTO Added to the module list, and working on a screenshot ( I cleared my MM installtion of modules to test this, so I have to re add them, otherwise its just a black image with snow icons on them…)
-
@cgillinger said in Let it snow now Magic Mirror:
I cleared my MM installtion of modules to test this
just fyi… you can use another config.js
without removing the existing or removing any modulesin the terminal window you are using to start/stop/test mm
export MM_CONFIG_FILE=config/_other_config_name.js
then npm start will use _other_config_name.js for config
(and in that other config you can point to a different custom.css!)
see https://docs.magicmirror.builders/configuration/introduction.html -
@sdetweil I had no idea this could be done. Thank you!
-
-
Hey, thanks for the module! Really like it.
Just two things that come to my mind:- From other modules I’m used to only do the config in the config.js (only compliments is different, but for a good reason). For your module I have to add it in config.js, but do the module configuration in a separate file. I’d really would appreciate it, if you could move the configuration also to the config.js. Also not sure if it the config would be reverted if I have to update the module or something.
- there are two Flake Counts, one in the “defaults” part and one in the performancePresets, same for size. Not sure which wins in which situation.
Thanks again for the module!
-
@OliWer I’ll fix this, this is one of my first modules, so I’ve done quite a few errors when it comes to following the frame work standard. And I think the flake count is because I sort of panicked when I realised that my Raspberry Pi almost choked on my first iteration, and I speed fixed the performance part. Ill look into it.
-
And think I got it going, after reworking the module yesterday.
-
Just updated and changed my config. Thanks for your fast response and changes!
Good work now and easier for me to play with to find perfect settings for my screen =)