This repository has been archived by the owner on Sep 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Merza, Leonardo (lm240n)
committed
Dec 13, 2018
0 parents
commit 61aad2c
Showing
3 changed files
with
520 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Calendar Card for Home Assistant | ||
![](https://i.imgur.com/egQofZM.png "Layout") | ||
() | ||
|
||
### Features | ||
* show the next 5 events on your Google Calendar (default set by home assistant) | ||
* Set custom time format for each event | ||
* click on event to open in your Google calendar app | ||
* Integrate multiple calendars | ||
* Update notifications via custom_updater | ||
|
||
### Track Updates | ||
This custom card can be tracked with the help of [custom-updater](https://github.com/custom-components/custom_updater). | ||
|
||
In your configuration.yaml | ||
|
||
``` | ||
custom_updater: | ||
card_urls: | ||
- https://raw.githubusercontent.com/ljmerza/homeassistant-lovelace-google-calendar-card/master/custom_updater.json | ||
``` | ||
|
||
## Usage | ||
### Prerequisites | ||
You should have setup Google calendar integration or Caldav integration in HomeAssistant. | ||
|
||
## Options | ||
|
||
| Name | Type | Requirement | Description | ||
| ---- | ---- | ------- | ----------- | ||
| type | string | **Required** | `custom:calendar-card` | ||
| showProgressBar | boolean | **Optional** | `true` Option to show the progress bar | ||
| numberOfDays | number | **Optional** | `7` Number of days to display from calendars | ||
| entities | object | **Required** | List of calendars to display | ||
| timeFormat | object | **Optional** | `HH:mm` Format to show event time (see [here](https://momentjs.com/docs/#/displaying/format/) for options) | ||
|
||
### Configuration | ||
Go to your config directory and create a www folder. Inside the www run | ||
|
||
``` | ||
git clone https://github.com/ljmerza/homeassistant-lovelace-google-calendar-card.git | ||
``` | ||
|
||
In your ui-lovelace.yaml | ||
|
||
``` | ||
resources: | ||
- url: https://unpkg.com/[email protected]/moment.js | ||
type: js | ||
- url: /local/homeassistant-lovelace-google-calendar-card/calendar-card.js?v=1.1.0 | ||
type: module | ||
``` | ||
|
||
Add the custom card to views: | ||
|
||
``` | ||
views: | ||
- type: custom:calendar-card | ||
name: "My Calendar" | ||
numberOfDays: 14 | ||
entities: | ||
- calendar.ljmerzagmailcom | ||
``` | ||
|
||
### You want more than 5 Google events? | ||
``` | ||
mkdir /config/custom_components/calendar | ||
cd /config/custom_components/calendar | ||
wget https://raw.githubusercontent.com/home-assistant/home-assistant/dev/homeassistant/components/calendar/google.py | ||
``` | ||
Use a text editor to change the `'maxResults': 5` in `google.py` to a number of your liking. |
Oops, something went wrong.