55 lines
2.2 KiB
Markdown
55 lines
2.2 KiB
Markdown
# Home Assistant Digital Calendar
|
|

|
|
This repo is intended to provide some additional help when setting up a digital calendar view for an alternative to a popular digital calendar. The original thread can be found [here](https://community.home-assistant.io/t/diy-family-calendar-skylight/844830)
|
|
|
|
## Calendar Connection
|
|
It's important to choose a calendar that supports CalDAV. For the sake of this repo I'll be using NextCloud's calendar option as I already have NextCloud running and want to stay away from Google services.
|
|
|
|
To connect you calendar you'll need to add the CalDAV integration to your Home Assistant
|
|
- Navigate to Settings > Devices & services
|
|
- Click add integration
|
|
- Search for CalDAV
|
|
- Enter your information
|
|
- For nextcloud users it's something like: `https://[YOUR_NEXTCLOUD_URL].com/remote.php/dav` (you can also find it in the nextcloud calendar settings > Copy pirmary CalDAV address)
|
|
- The username and password of the user you want to add the calendar for
|
|
|
|
## Scripts and Helpers
|
|
These are probably the most important part of the whole set up as if you don't have them set, you can't do any of the filtering
|
|
|
|
For each calendar or person you need to have this script located in `Settings > Automations & scenes > scripts`
|
|
```yaml
|
|
alias: [CALENDAR_OR_PERSON_NAME] Calendar Visible Filter
|
|
description: "Shows or hides events for [CALENDAR_OR_PERSON_NAME] Calendar"
|
|
sequence:
|
|
- data:
|
|
entity_id: input_text.[CALENDAR_OR_PERSON_NAME]_calendar_filter
|
|
value: |
|
|
{% if is_state('input_text.[CALENDAR_OR_PERSON_NAME]_calendar_filter', '.*') %}
|
|
^$
|
|
{% else %}
|
|
.*
|
|
{% endif %}
|
|
action: input_text.set_value
|
|
```
|
|
|
|
The Helpers you need to add are as follows:
|
|
Text:
|
|
“calendar_event_title”
|
|
“calendar_event_description”
|
|
“birthdays_calendar_filter”
|
|
“[CALENDAR_OR_PERSON_NAME]_calendar_filter”
|
|
|
|
Dropdown:
|
|
“calendar_select” (add your calendar options)
|
|
“calendar_view” (options: Today, Tomorrow, Week, Biweek, Month, Bimonth)
|
|
|
|
Datetime (Date):
|
|
“calendar_day_event_start”
|
|
“calendar_day_event_end”
|
|
|
|
Datetime (Time)
|
|
“calendar_event_start”
|
|
“calendar_event_end”
|
|
|
|
Toggle:
|
|
“calendar_all_day_event” |