Read the statement by Michael Teeuw here.
MMM-WeatherOrNot - Forecast
-
Re: MMM-WeatherOrNot
It’s possible to activate/deactivate the current weather e.g.currentWeather: "true"/"false" ? -
@bjoern If there’s nothing in the README about that, you can try to find out the elements id or class and give it
display: nonein your custom.css.MMM-WeatherOrNot .someElement { display: none; } -
@lavolp3 said in MMM-WeatherOrNot - Forecast:
.MMM-WeatherOrNot .someElement {
display: none;
}Thanks a lot, but it does not work.
.MMM-WeatherOrNot .currentWeather { display: none; }i don’t know why. it’s the corect element, in my opinion
-
@bjoern said in MMM-WeatherOrNot - Forecast:
@lavolp3 said in MMM-WeatherOrNot - Forecast:
.MMM-WeatherOrNot .someElement {
display: none;
}Thanks a lot, but it does not work.
.MMM-WeatherOrNot .currentWeather { display: none; }i don’t know why. it’s the corect element, in my opinion
I agree, the element selector is the right one.
It sits in an iframe, that may be the reason.
I don’t know how to get to the css inside the iframe. -
Hi @bjoern - so I think this should be possible (although there doesn’t seem to be a way to configure it in the module’s
config.jsentry just now)The MMM-WeatherOrNot readme says that the information it displays is pulled from https://weatherwidget.io/. If you go there and try adjusting the sample widget shown on the site, there’s an option for Current / Forecast, which you can set to Current, Forecast or Both. It looks like it defaults to Both, which I guess is what you’re seeing.
By trying the different options and clicking on the GET CODE button, I get a code block including either
data-mode="Forecast"data-mode="Current"or a block with no
data-modein at all, if I select Both.If you look in the
MMM-WeatherOrNot.jsfile you can see at the bottom where this codeblock to pull the correctly-configured information is sort of constructed, based on the values you’ve given in yourconfig.js.So it looks like you could theoretically:
- add a new parameter to your
config.js, e.g.
{ disabled: false, module: 'MMM-WeatherOrNot', position: 'middle center', config: { location: "staten-island", dataMode: "Forecast", // valid options are "Both", "Forecast" or "Current"- update
MMM-WeatherOrNot.jsto refer to the parameter - where it shows
/ Insert config options iframe.srcdoc = `<a class="weatherwidget-io"you could maybe include
data-mode="${this.config.dataMode}"Something like that anyway. And then it might allow you to control whether the Current weather is shown or just the Forecast using the config.
- add a new parameter to your
-
@raymondjspigot Great idea! You should create a PR from that! Look here @Mykle1
-
@raymondjspigot : thanks a lot. that it’s. works fine!
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