All Projects → franc6 → ics_calendar

franc6 / ics_calendar

Licence: Apache-2.0 license
Provides an ICS (icalendar) platform for the Home Assistant calendar

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to ics calendar

ics
Integration that displays the next event of an ics link (support reoccuring events)
Stars: ✭ 48 (-11.11%)
Mutual labels:  ics, homeassistant
addon-zerotier
ZeroTier One - Home Assistant Community Add-ons
Stars: ✭ 103 (+90.74%)
Mutual labels:  homeassistant
home-assistant-nespressoble
NESPRESSO ble Home Assistant custom componenets and also a 2MQTT script
Stars: ✭ 34 (-37.04%)
Mutual labels:  homeassistant
addon-unifi
UniFi Network Application - Home Assistant Community Add-ons
Stars: ✭ 190 (+251.85%)
Mutual labels:  homeassistant
hass-miwifi
MiWiFi for Home Assistant
Stars: ✭ 116 (+114.81%)
Mutual labels:  homeassistant
ledfxrm
Custom Integration for Home Assistant to control a any (local/remote) LedFX-server - State: beta
Stars: ✭ 31 (-42.59%)
Mutual labels:  homeassistant
hive
My home infrastructure
Stars: ✭ 31 (-42.59%)
Mutual labels:  homeassistant
haconfigs
My Home-Assistant configuration files
Stars: ✭ 61 (+12.96%)
Mutual labels:  homeassistant
docker-wyze-bridge
RTMP/RTSP/LL-HLS bridge for Wyze cams in a docker container
Stars: ✭ 1,146 (+2022.22%)
Mutual labels:  homeassistant
esp8266 p1meter
dsmr 4.2 P1 meter to mqtt using esp8266 nodemcu
Stars: ✭ 69 (+27.78%)
Mutual labels:  homeassistant
LennoxiComfort
Home Assistant custom component for controlling Lennox iComfort WiFi and AirEase Comfort Sync thermostats.
Stars: ✭ 22 (-59.26%)
Mutual labels:  homeassistant
bootstrap-grid-card
Bootstrap grid in Lovelace UI
Stars: ✭ 25 (-53.7%)
Mutual labels:  homeassistant
domru
Докер контейнер для интеграции домофона от Domru в Home Assistant
Stars: ✭ 54 (+0%)
Mutual labels:  homeassistant
sensor.rpi power
A Custom component for Home-Assistant that checks if your Raspberry Pi power supply is giving enough voltage from the kernel.
Stars: ✭ 105 (+94.44%)
Mutual labels:  homeassistant
Industrial-Security-Auditing-Framework
ISAF aims to be a framework that provides the necessary tools for the correct security audit of industrial environments. This repo is a mirror of https://gitlab.com/d0ubl3g/industrial-security-auditing-framework.
Stars: ✭ 43 (-20.37%)
Mutual labels:  ics
sensor.greenely
Custom component to get usage data and prices from Greenely for Home Assistant
Stars: ✭ 41 (-24.07%)
Mutual labels:  homeassistant
homeassistant-config
My Home Assistant YAML configuration
Stars: ✭ 249 (+361.11%)
Mutual labels:  homeassistant
hfeasy
HFeasy - firmware for HF-LPx100/LPx30 based devices
Stars: ✭ 35 (-35.19%)
Mutual labels:  homeassistant
ha-samsungtv-smart
📺 Home Assistant SamsungTV Smart Component with simplified SmartThings API Support configurable from User Interface.
Stars: ✭ 240 (+344.44%)
Mutual labels:  homeassistant
fullscreen-card
Make your Home Assistant browser fullscreen with one tap.
Stars: ✭ 23 (-57.41%)
Mutual labels:  homeassistant

ics_calendar

hacs_badge ics_calendar Coverage Maintained:yes License

Provides an ICS (icalendar) platform for the Home Assistant calendar

NOTE: This calendar platform is intended for use with simple hosting of ICS files. If your server supports CalDAV, please use the caldav platform instead. This one might work, but probably not well.

Installation

You can install this through HACS.

Otherwise, you can install it manually.

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called ics_calendar.
  4. Download all the files from the custom_components/ics_calendar/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Inside the new directory, run 'pip install -r requirements.txt'
  7. Restart Home Assistant
  8. Add platform: ics_calendar to your HA's calendar configuration.

Using your HA configuration directory (folder) as a starting point you should now also have this:

custom_components/ics_calendar/__init__.py
custom_components/ics_calendar/manifest.json
custom_components/ics_calendar/calendar.py
custom_components/ics_calendar/icalendarparser.py
custom_components/ics_calendar/parsers/__init__.py
custom_components/ics_calendar/parsers/parser_ics.py
custom_components/ics_calendar/parsers/parser_rie.py

Authentication

This calendar platform supports HTTP Basic Auth and HTTP Digest Auth. It does not support more advanced authentication methods.

Example configuration.yaml

calendar:
- platform: ics_calendar
  calendars:
      - name: "Name of calendar"
        url: "https://url.to/calendar.ics"
      - name: "Name of another calendar"
        url: "https://url.to/other_calendar.ics"
        include_all_day: True
      - name: "Name of a calendar that requires authentication"
        url: "https://url.to/auth/calendar.ics"
        include_all_day: True
        username: True
        password: !secret auth_calendar

Configuration options

Key Type Required Description
calendars list True The list of remote calendars to check

Configuration options for calendar list

Key Type Required Description
name string True A name for the calendar
url string True The URL of the remote calendar
days positive integer False The number of days to look ahead (only affects the attributes of the calendar entity), default is 1
download_interval positive integer False The time between downloading new calendar data, in minutes, default is 15
exclude string False Allows for filtering of events, see below
include string False Allows for filtering of events, see below
include_all_day boolean False Set to True if all day events should be included
parser string False 'rie' or 'ics', defaults to 'rie' if not present
username string False If the calendar requires authentication, this specifies the user name
password string False If the calendar requires authentication, this specifies the password
user_agent string False Allows setting the User-agent header. Only specify this if your server rejects the normal python user-agent string. You must set the entire and exact user agent string here.

Download Interval

The download interval should be a multiple of 15 at this time. This is so downloads coincide with Home Assistant's update interval for the calendar entities. Setting a value smaller than 15 will increase both CPU and memory usage. Higher values will reduce CPU usage. The default of 15 is to keep the same behavior with regards to downloads as in the past.

Parsers

ics_calendar uses one of two parsers for generating events from calendars. These parsers are written and maintained by third parties, not by me. Each comes with its own sets of problems.

Version 1.x used "ics" which does not handle recurring events, and has a few other problems (see issues #6, #8, and #18). The "ics" parser is also very strict, and will frequently give parsing errors for files which do not conform to RFC 5545. Some of the most popular calendaring programs produce files that do not conform to the RFC. The "ics" parser also tends to require more memory and processing power. Several users have noted that it's unusuable for HA systems running on Raspberry pi computers.

The Version 2.0.0 betas used "icalevents" which is a little more forgiving, but has a few problems with recurring event rules. All-day events which repeat until a specific date and time are a particular issue (all-day events which repeat until a specific date are just fine).

In Version 2.5 and later, a new parser, "rie" is the default. Like "icalevents", it's based on the "icalendar" library. This parser appears to fix both issues #8 and #36, which are problematic for "icalevents".

Starting with version 2.7, "icalevents" is no longer available. If you have specified icalevents as the parser, please change it to rie or ics.

As a general rule, I recommend sticking with the "rie" parser, which is the default. If you see parsing errors, you can try switching to "ics" for the calendar with the parsing errors.

Filters

The new exclude and include options allow for filtering events in the calendar. This is a string representation of an array of strings or regular expressions. They are used as follows:

The exclude filters are applied first, searching in the summary and description only. If an event is excluded by the exclude filters, the include filters will be checked to determine if the event should be included anyway.

Regular expressions can be used, by surrounding the string with slashes (/). You can also specify case insensitivity, multi-line match, and dotall matches by appending i, m, or s (respectively) after the ending slash. If you don't understand what that means, you probably just want to stick with plain string matching. For example, if you specify "['/^test/i']" as your exclude filter, then any event whose summary or description starts with "test", "Test", "TEST", etc. will be excluded.

For plain string matching, the string will be searched for in a case insensitive manner. For example, if you specify "['test']" for your exclude filter, any event whose summary or description contains "test", "Test", "TEST", etc. will be excluded. Since this is not a whole-word match, this means if the summary or description contains "testing" or "stesting", the event will be excluded.

You can also include multiple entries for exclude or include.

Examples

calendar:
- platform: ics_calendar
  calendars:
      - name: "Name of calendar"
        url: "https://url.to/calendar.ics"
        exclude: "['test', '/^regex$/']"
        include: "['keepme']"

This example will exclude any event whose summary or description includes "test" in a case insensitive manner, or if the summary or description is "regex". However, if the summary or description includes "keepme" (case insensitive), the event will be included anyway.

Buy me some pizza

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].