It appears to me the back end api is sometimes throwing exceptions which I indeed don’t expect/support currently. The question is why is the back end retuning exceptions while an empty array would suffice.
I’ll try to look into it when I have some spare time.
I was wondering if it is possible to hide/ not displaying the card. If there is no entry to display.
Use case in for me is the birthday calendar, which has not everytime an entry available.
of course, i’ve tested it. just change the url (e.g. - url: /local/calendar-card.js?v=42 ) of the include in your lovelace config to see effect… greetz
It would be great if this could handle all day events which span multiple days. Currently it only displays them on the first day. In the Calendar app on my Android phone it shows 2 day event like “Event Name (Day 1 of 2)” and “Event Name (Day 2 of 2)”. Something like this would be great.
Everytime i open the view with calendar-card i get the following error:
2018-09-15 00:12:31 ERROR (MainThread) [frontend.js.latest.201809030] https://xxxxxxxxx.duckdns.org/local/calendar-card.js:10:7 Uncaught ReferenceError: moment is not defined
The template code of this card is the following:
{% if as_timestamp(now()) | timestamp_custom('%Y-%m-%d') == (states.calendar.mauriziofabianigmailcom.attributes.start_time).split(" ")[0] and states.calendar.mauriziofabianigmailcom.attributes.all_day != True %} Prossimo appuntamento in agenda: {{states.calendar.mauriziofabianigmailcom.attributes.message}} alle {{(states.calendar.mauriziofabianigmailcom.attributes.start_time).split(" ")[1].split(":")[0]}} {%if (states.calendar.mauriziofabianigmailcom.attributes.start_time).split(" ")[1].split(":")[1] != '00'%}{{(states.calendar.mauriziofabianigmailcom.attributes.start_time).split(" ")[1].split(":")[1]}} {%endif%} {%endif%}
{% if as_timestamp(now()) | timestamp_custom('%Y-%m-%d') == (states.calendar.mauriziofabianigmailcom.attributes.start_time).split(" ")[0] and states.calendar.mauriziofabianigmailcom.attributes.all_day == True %} Oggi è: {{states.calendar.mauriziofabianigmailcom.attributes.message|replace("/","and")}}{%endif%}
{% if as_timestamp(now()) | timestamp_custom('%Y-%m-%d') == (states.calendar.inter_calendar.attributes.start_time).split(" ")[0] and states.calendar.inter_calendar.attributes.all_day != True %} Prossimo appuntamento in agenda: {{states.calendar.inter_calendar.attributes.message}} alle {{(states.calendar.inter_calendar.attributes.start_time).split(" ")[1].split(":")[0]}} {%if (states.calendar.inter_calendar.attributes.start_time).split(" ")[1].split(":")[1] != '00'%}{{(states.calendar.inter_calendar.attributes.start_time).split(" ")[1].split(":")[1]}} {%endif%} {%endif%}
{% if as_timestamp(now()) | timestamp_custom('%Y-%m-%d') == (states.calendar.inter_calendar.attributes.start_time).split(" ")[0] and states.calendar.inter_calendar.attributes.all_day == True %} Oggi è: {{states.calendar.inter_calendar.attributes.message|replace("/","and")}}{%endif%}
{% if as_timestamp(now()) | timestamp_custom('%Y-%m-%d') == (states.calendar.contacts.attributes.start_time).split(" ")[0] and states.calendar.contacts.attributes.all_day != True %} Prossimo appuntamento in agenda: {{states.calendar.contacts.attributes.message}} alle {{(states.calendar.contacts.attributes.start_time).split(" ")[1].split(":")[0]}} {%if (states.calendar.contacts.attributes.start_time).split(" ")[1].split(":")[1] != '00'%}{{(states.calendar.calendar.contacts.start_time).split(" ")[1].split(":")[1]}} {%endif%} {%endif%}
{% if as_timestamp(now()) | timestamp_custom('%Y-%m-%d') == (states.calendar.contacts.attributes.start_time).split(" ")[0] and states.calendar.contacts.attributes.all_day == True %} Oggi è: {{states.calendar.contacts.attributes.message|replace("/","and")}}{%endif%}
just create a folder named “www” where configuration.yaml is located. Internally, you use /local/[file.js].
(You can also place pictures in the www folder, or create pictures subfolder, to assign entity pictures then)
Hard to find some information about it in the docs…