Yevgenium/weather-chart-card

Not loading data in Safari and the IOS Companion App

briis opened this issue · 2 comments

briis commented

Hi,
The card throws an error in the latest version of the IOS Companion App and the Safari browser and does not display anything. When loading it from a Chrome browser on the same Mac it works perfectly. The error I am seeing in Safari is:

Taking the same weather entity and loading it in the built-in weather card also works fine, so there is nothing wrong with the data itself.

[Error] Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'forecast[1].datetime')
	(anonym funktion) (weather-chart-card.js:190:4438)
	asyncFunctionResume
	(anonym funktion)
	promiseReactionJobWithoutPromise

This error looks like your weather entity may not have a forecast object with sufficient data on it. Have you ensured your weather object has a forecast on it and at least 2 elements? This can be done via the developer tools.

briis commented

As I wrote, it works fine in a Chrome Browser, but if I open Safari on the same computer it does not work. I integrated your card in to the Custom Button Card, and it is only when doing that, that it fails.
Anyway I put it up as standalone card, and now it also works on Safari, so I close this.