@sdetweil
for comparison, using a UK holiday calendar, the default icon is present, but the sleigh for Christmas isn’t
@sdetweil
for comparison, using a UK holiday calendar, the default icon is present, but the sleigh for Christmas isn’t
@sdetweil No longer get the error, but the icon’s still don’t show
Styles loaded for: MMM-CalendarExt3
loader.js:164 Translations loaded for: MMM-CalendarExt3Refused to apply style from ‘http://localhost:8080/css/custom.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.
2calendar.js:89 Starting module: calendar
localhost/:1 Refused to apply style from ‘http://localhost:8080/css/custom.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.
Not sure I understand the question. I know from the github page it talks about EX3 taking information from the default calendar.
Have just tried person-swimming, but still gives same results.
Hi again,
below is a brief part of my config.js. A few days ago this was working fine, however now it no longer shows the icon/symbol in the default calendar.
Note there is also configuration for colors which does work.
{
module: "calendar",
header: "FamCal",
position: "top_left",
config: {
displaySymbol: true,
customEvents: [ {keyword: "Swimming", symbol: "swimmer"},
it does however show the icon in the MMM-Calendarext3
@bicolorbore586 from the line Could not load data … TypeError: Cannot read properties of undefined (reading ‘0’) at weatherbit.is
@sdetweil
so I commented out the original text and added in the new:
code_text
``` fetchCurrentWeather() {
this.fetchData(this.getUrl())
.then((data) => {
/*if (!data || !data.data[0] || typeof data.data[0].temp === "undefined") {
// No usable data?
return;
}
const currentWeather = this.generateWeatherDayFromCurrentWeather(data);
this.setCurrentWeather(currentWeather);*/
if(!data || (data && data.error)){
Log.error("Could not load data ... ", data?data.error: "no data returned");
}
else {
if (!data || !data.data[0] || typeof data.data[0].temp === "undefined") {
// No usable data?
return;
}
const currentWeather = this.generateWeatherDayFromCurrentWeather(data);
this.setCurrentWeather(currentWeather);
}
})
.catch(function (request) {
Log.error("Could not load data ... ", request);
})
.finally(() => this.updateAvailable());
@sdetweil
ok, have put it back to how it was… that was final “can I get this to work, before I ask for further help”
this is my config.js
code_text
``` {
module: "weather",
position: "top_right",
config: {
weatherProvider: "weatherbit",
type: "current",
lat: 5,
lon: -1,
apiKey: "ab4",
useCorsProxy: true
}
},
{
module: "weather",
position: "top_right",
header: "Weather Forecast",
config: {
weatherProvider: "weatherbit",
type: "forecast",
lat: 5,
lon: -1,
initialLoadDelay: 1,
apiKey: "ab4",
useCorsProxy: true
}
},
@sdetweil @karsten13 have added in the useCorsProxy: true
Have since updated MagicMirror, now getting
Could not load data … TypeError: Cannot read properties of undefined (reading ‘0’)
which when clicked on shows weatherbit.js
code_text
```/* global WeatherProvider, WeatherObject */
/* MagicMirror²
* Module: Weather
* Provider: Weatherbit
*
* By Andrew Pometti
* MIT Licensed
*
* This class is a provider for Weatherbit, based on Nicholas Hubbard's class
* for Dark Sky & Vince Peri's class for Weather.gov.
*/
WeatherProvider.register("weatherbit", {
// Set the name of the provider.
// Not strictly required, but helps for debugging.
providerName: "Weatherbit",
// Set the default config properties that is specific to this provider
defaults: {
apiBase: "https://api.weatherbit.io/v2.0",
apiKey: "",
lat: 0,
lon: 0
},
fetchedLocation: function () {
return this.fetchedLocationName || "";
},
fetchCurrentWeather() {
this.fetchData(this.getUrl())
.then((data) => {
if (!data || !data.data[0] || typeof data.data[0].temp === "undefined") {
// No usable data?
return;```
Forgive me, again for being a noob, but I didn’t think this required any information in, however having substituted the lat and lon zero’s for my location, still throws up the same and error and points me to the [0] following !data.data
@sdetweil I used the MagicMirror installation instructions (assuming manual install) to install the software.
Have just tried your git fetch origin
But get fatal: Refusing to fetch into current branch refs/heads/develop of none-bare repository.
(Sorry, you’re probably shaking your head, but I am a complete noob at all this)