📅 Calendar Add-On + some calendar designs

Hey there, sorry for my slow replay here - will come to this at the weekend and will try to get everything to logging and send it to you then. thanks for all you effort here=)

It may help to delete the json file with backup of your calendar when you change the configuration. I still need to improve the code when it comes to dealing with changed config. You can find that file here in the HA filesystem:
ksnip_20220205-210321

let me try this :slight_smile: Thanks for the hint. But i cannot find this data folder. using hassos… any idea?

I don’t have the samba addon running, but i guess it should be possible to navigate to that subfolder that way.

I get “Invalid Add-on repository!” when trying to add it

Most likely you used the wrong url when trying to add the repo. Try again with the url that is in the installation instructions.

I have same problem. Can you post repositiry link?

The repository-url is just that of the github repo: GitHub - kdw2060/hassio-addons: Repo for my Home Assistant add-ons

1 Like

I don’t understan what I must add in googleServiceAccountKeyfile?

Name of json file I created on google service-account?

Yes, the file-name goes in the config.

The file itself should be copied to the /share folder of Home Assistant.

1 Like

Can I fetch even description to sensor? How?

If you’re working with a google calendar then yes. You don’t need to do anything besides configuring the addon. The description will show up in the label field, like in my example in the start post.
I called it ‘label’ because that’s how I use it. I put an emoticon and one or two words in the description field in google calendar. But longer texts would simply show up in that field too.

1 Like

This Add-On looks awesome and exactly what I want. I keep running into a problem…I have tried the Add-On both locally and through the traditional Add-On method, but I keep receiving this error:

Many thanks for any and all help!!

Your locale setting in the addon config seems to be wrong. For English you need to choose one of the variants that Moment offers (screenshot from momentjs.com)

THAT DID IT…yay! Thank you SO very much. This Add-On is awesome. I was confused from what I saw on momentjs.com as the next line down shows English (United States)…

Nonetheless…using en-gb did the trick. Thank you again so much.

NEW version published (0.200)

I pushed an update to Github. If you upgrade, make sure to edit your configuration as the configuration structure has changed.

The update mainly consists of improvements added by @cellerich:

  • Number of days to get events for is now a setting in stead of fixed 365 days
  • Frequency of querying events is now a setting in stead of fixed 30 minutes
  • Support for Baikal calldav calendars

Make sure to read the docs for more info on the changed config.

1 Like

Im sorry for my missed excerpt out of my caldav, but i used the time to get a bit used to your addon and i wanted to share my setup with all of you.

So one snippet out of my use case is that i combine two calendars dedicated to hold trash dates for different places (here lambsheim and frankenthal). Also i Filter all the events to only hold events in the upcoming week, search in there name for a matching trash type and give them a symbol and shortname.
I think this way i would be possible to get a neat integration of trashdays from different serviceholders via the exported trashlists - mine let them export directly to CalDav so this is seamlessly easy.

          {% set d1 = states.sensor.cal_frankenthal.state %}
          {% set d2 = states.sensor.cal_lambsheim.state %}
          {% set d3 = ((d1|int)+(d2|int)) %}
          {% set a = states.sensor.cal_frankenthal.attributes.data %}
          {% set b = states.sensor.cal_lambsheim.attributes.data %}
          {% set i = (a + b) | sort(attribute='endDate')%}
          {% for h in i%}
          {% set filter = (((as_timestamp(h.endDate) - as_timestamp(now())) / 60) | int)  %}
          {% if filter < 10080 %}
          {%- if  loop.first %}[ {% endif %} { "name": '{{loop.index}}',{%- if 'Frankenthal' in h.description -%}  "location": 'FT',{%- elif 'Lambsheim' in h.description -%}"location": 'LA',{% endif%}{%- if 'Altpapier' in h.description -%}  "symbol": '🟦', "trash": "Papier",{%- elif 'Schadstoff' in h.description -%}"symbol": '🟥',"trash": "Schadstoffe",{%- elif 'Restabfall' in h.description -%}"symbol": '⬛',"trash": "Restabfall",{%- elif 'Wertstoffe\, Bioabfall' in h.description -%}"symbol": '🟨🟫',"trash": "Papier & Plastik", {%- elif 'Abfuhr' in h.description -%}"symbol": '🟫', "trash": "Bio",{%- endif %} "summary": '{{h.description}}', "minutes_till": {{((as_timestamp(h.endDate) - as_timestamp(now())) / 60) | int }},"state": {{d3}}, "start_time": '{{h.start_day}}.{{'%02d' % h.start_month_digits}}.{{h.year}} {{h.start_time}} Uhr', "time_z": '{{h.startDate[:-14]}} {{h.start_time}} - {{h.end_time}}' } {%- if not loop.last %},{% endif -%}
          {%- else -%}
          {%- endif %}
          {%- endfor %}]

after that i just put them in a markdowncard an let this be displayed as follows:

<b>Termine Frankenthal & Lambsheim</b>
| | |  
|:---:|:---|
{% for i in states.sensor.upcoming_events.attributes["object_lauft"] %}{% if i["summary"] == NULL %}
{%- else -%}
| {{i["symbol"]}} | <b>{{i["trash"]}} {{i["location"]}} |
| |{{ i["start_time"] }} | |
| |noch  {{ i["minutes_till"] }} Minuten | |
{%- endif %}
{% endfor %}

Bildschirmfoto 2022-05-13 um 09.05.40

Im still having issues with the startDate and endDate of the calendar integration - but this finally is my fault cause i hadnt had the time to export my log for you - sorry for that again.

Greetings=)

I do that, but what is the next step?

Frontend …

screenb

Hallo Bernd,

it sounds like you’re not familiar with sensor data, templating or the developer tools of Home Assistant. You will need to familiarize yourself with those concepts if you want to use your calendar data somewhere.

Your screenshot indicates that the addon is working properly, navigate to the dev-tools and search for the name you gave your calendar there. It should look something like this:

In my addon documentation I’ve linked to the Home Assistant documentation about templating. You can test your templating syntax in the dev tools too, like this:

The post before yours in this thread by user Flipso contains an example of some more complex templating syntax inside a markdown card.

Personally I’m not very fond of the jinja templating syntax that Home Assistant uses and prefer to write javascript for this instead. You can do this inside a custom button card. In my initial post in this thread I link to two example custom button cards.

Eitherway if you’re not familiar with scripting languages you’ll have a bit of a learning curve ahead I’m afraid.