Read the statement by Michael Teeuw here.
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
-
@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.js
entry 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-mode
in at all, if I select Both.If you look in the
MMM-WeatherOrNot.js
file 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.js
to 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!