Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Merza, Leonardo (lm240n) committed Dec 13, 2018
0 parents commit 61aad2c
Show file tree
Hide file tree
Showing 3 changed files with 520 additions and 0 deletions.
71 changes: 71 additions & 0 deletions README.md
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.
Loading

0 comments on commit 61aad2c

Please sign in to comment.