Lovelace Google Calendar

Currently, you can’t :slight_smile: . It follows the color of your theme. But, since it now is not compiled anymore, you can easily change it yourself.

I just done all steps same as you (i think), but get same error:3-default

File calendar-card.js raw downloaded to /config/www/ dir with 777 permission…

In fact, i have other custom cards succesfully loaded on ui.lovelace.yaml.

I have tried appending “?v=0.0.3” or changing “type: module” to “type: js”

What am i loosing?

Add this under fronted in “configration.yaml” file se below

frontend: javascript_version: latest

08

thanks @Supersonical

But i had already added it.

Well, besides trying different version suffixes I’m stumped :thinking:

Check the developer console, I think you will have a 404 . So, probably, the URL to the calendar card is wrong.

That is right @rdehuyss

I got following error message:

Screenshot_1

URL seems OK, but i can’t find syntax error in my code:

  • type: custom:calendar-card
    name: “”
    showprogressbar: false
    entities:
    - calendar.XXXXXXXXXXXXXXX
    - calendar.contacts

Your calendar-card.js should be ~9KB in size, is that correct?

Im a little confused by this…at first you say I cant, but at the end it sounds like your saying I can.

If so, would you mind sharing how I can adjust that?

Thank you

If you know a little about html and css, you can open the contents of the card and change the styling in the style tag

Have you tried the simplest install possible?

type: custom:calendar-card
entities:

  • calendar.XXXXXXXXXXXXXXX
  • calendar.contacts

The casing of showProgressBar is wrong and I didn’t try with an empty name. Also, like @vermis said, check in the network tab that your card size is 8.4 KB

@rdehuyss you haven’t by any chance found out how to make the number of maxResults more configurable? I’m not very much into the file system of HASS, and I couldn’t find the path to the .py file that was mentioned in the readme via the terminal, but it might be easier to navigate to than I’m able to find.

@tottow I’m afraid this is a change in the backend where I’m not yet proficient in…

In the docker container of homeassistant, this is the complete path to the file /usr/src/app/homeassistant/components/calendar/google.py.

I hope you can find it this way… Do note that you need to restart home-assistant.

Thnx for this really nice card. But is it possible that de module looks further then the 7 days?

Greetings justin

Yeah, just read the two posts above yours :wink:

pfff Stupid question of me. But now to find google.py. if i search with find -name google.py it hasn’t found any file :frowning:

I hope this question is better

I had this same issue and solved it by right-clicking (Windows PC) on the link to the raw js file and saving it directly to my /local/ folder. I had copied the text from the raw file and pasted into a new file in /local/, but for some reason there was still some character or encoding that wasn’t right.

I also kept getting the “Custom element doesn’t exist: calendar-card” error until I added a calendar that actually had an event for today.

I’d added my personal Google calendar and our family calendar, nether of which had any events for today, and the error persisted. Then I added - calendar.weather_new_york_ny_united_states , the weather that I’d added to my Google calendar and boom… she works.

So it appears that, at least in my case, I had to have added a calendar where there was at least one event for the day.

Thanks guys .

The main issue was raw downloaded file.

Now it is working fine!!

Yup can confirm mine also fails unless I have an event today.
Submitted an issue to the github repo, would love to help fix this!

First of all @rdehuyss, thanks a lot for a great card!

Secondly, I do unfortunately have the same problem. Please see picture. It seems that the cause of this problem is an empty result. If I add a calendar that has no events in the time interval (currently ?start=2018-09-01T00:00:00Z&end=2018-09-08T00:00:00Z) that is requested, nothing is shown. When I remove the calendar without events it works as expected.

I am really no JS-programmer. However, I again assume that you need to do something with the error handling here because getting no result is kind of a valid result and not neccessarily an error that should abort the script. I admit I could be waaaaay off :slight_smile:

async getAllUrls(urls) {
try {
var data = await Promise.all(
urls.map(
url => this._hass.callApi(‘get’, url)));
return (data);
} catch (error) {
throw (error);
}
}

Edit: This is of course when I try to add/merge more than one calendar in one view.