Skip to content

Commit

Permalink
Merge pull request #171 from FamousWolf/dev
Browse files Browse the repository at this point in the history
[MERGE] Changes for version 1.8.0
  • Loading branch information
FamousWolf authored Oct 28, 2024
2 parents 457a51b + 40d7e1e commit 395343f
Show file tree
Hide file tree
Showing 6 changed files with 277 additions and 311 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea/
.parcel-cache/
node_modules/
dist/week-planner-card.js
Expand Down
67 changes: 37 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Custom Home Assistant card displaying a responsive overview of multiple days wit
Add:
```yaml
resources:
- url: /local/week-planner-card.js?version=1.7.1
- url: /local/week-planner-card.js?version=1.8.0
type: module
```
- **Using the graphical editor**
Expand All @@ -53,38 +53,42 @@ Custom Home Assistant card displaying a responsive overview of multiple days wit

### Main Options

| Name | Type | Default | Supported options | Description | Version |
|-------------------------|------------------|----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|---------|
| `type` | string | **Required** | `custom:week-planner-card` | Type of the card | 1.0.0 |
| `title` | string | optional | Any string | Card title | 1.6.0 |
| `days` | number \| string | 7 | Any positive integer number \| `month` | The number of days to show | 1.0.0 |
| `startingDay` | string | `today` | `today` \| `tomorrow` \| `yesterday` \| `sunday` \| `monday` \| `tuesday` \| `wednesday` \| `thursday` \| `friday` \| `saturday` \| `month` | Day to start with | 1.2.0 |
| `startingDayOffset` | number | 0 | Any integer number | Add or subtract days from starting day | 1.7.0 |
| `hideWeekend` | boolean | false | `false` \| `true` | Do not show Saturday and Sunday | 1.2.0 |
| `noCardBackground` | boolean | false | `false` \| `true` | Do not show default card background and border | 1.0.0 |
| `eventBackground` | string | `var(--card-background-color, inherit)` | Any CSS color | Background color of the events | 1.0.0 |
| `compact` | boolean | false | `false` \| `true` | Use compact mode, decreasing several spacings and font sizes | 1.2.0 |
| `updateInterval` | number | 60 | Any positive integer number | Seconds between checks for new events | 1.0.0 |
| `calendars` | object list | **Required** | See [Calendars](#calendars) | Calendars shown in this card | 1.0.0 |
| `texts` | object list | {} | See [Texts](#texts) | Texts used in the card | 1.0.0 |
| `weather` | object | optional | See [Weather](#weather) | Configuration for optional weather forecast | 1.1.0 |
| `dayFormat` | string | optional | See [Luxon format](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) | Format of the date at the top of the day. This is not escaped, so HTML is allowed here | 1.6.0 |
| `dateFormat` | string | `cccc d LLLL yyyy` | See [Luxon format](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) | Format of the date in event details | 1.0.0 |
| `timeFormat` | string | `HH:mm` | See [Luxon format](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) | Format of the time | 1.0.0 |
| `locale` | string | `en` | Any locale string supported by Luxon | Locale used for day and month texts | 1.1.0 |
| `locationLink` | string | `https://www.google.com/maps/search/?api=1&query=` | Any URL | Link used for event location in the detail popup | 1.1.0 |
| `showLocation` | boolean | false | `false` \| `true` | Show event location in overview | 1.3.0 |
| `hidePastEvents` | boolean | false | `false` \| `true` | Do not show past events | 1.3.0 |
| `hideDaysWithoutEvents` | boolean | false | `false` \| `true` | Do not show days without events, except for today | 1.4.0 |
| `filter` | string | optional | Any regular expression | Remove events that match the regular expression | 1.7.0 |
| Name | Type | Default | Supported options | Description | Version |
|--------------------------|------------------|----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|---------|
| `type` | string | **Required** | `custom:week-planner-card` | Type of the card | 1.0.0 |
| `title` | string | optional | Any string | Card title | 1.6.0 |
| `days` | number \| string | 7 | Any positive integer number \| `month` | The number of days to show | 1.0.0 |
| `startingDay` | string | `today` | `today` \| `tomorrow` \| `yesterday` \| `sunday` \| `monday` \| `tuesday` \| `wednesday` \| `thursday` \| `friday` \| `saturday` \| `month` | Day to start with | 1.2.0 |
| `startingDayOffset` | number | 0 | Any integer number | Add or subtract days from starting day | 1.7.0 |
| `hideWeekend` | boolean | false | `false` \| `true` | Do not show Saturday and Sunday | 1.2.0 |
| `noCardBackground` | boolean | false | `false` \| `true` | Do not show default card background and border | 1.0.0 |
| `eventBackground` | string | `var(--card-background-color, inherit)` | Any CSS color | Background color of the events | 1.0.0 |
| `compact` | boolean | false | `false` \| `true` | Use compact mode, decreasing several spacings and font sizes | 1.2.0 |
| `updateInterval` | number | 60 | Any positive integer number | Seconds between checks for new events | 1.0.0 |
| `calendars` | object list | **Required** | See [Calendars](#calendars) | Calendars shown in this card | 1.0.0 |
| `texts` | object list | {} | See [Texts](#texts) | Texts used in the card | 1.0.0 |
| `actions` | object list | {} | See [Actions](#actions) | Actions for the card | 1.8.0 |
| `weather` | object | optional | See [Weather](#weather) | Configuration for optional weather forecast | 1.1.0 |
| `dayFormat` | string | optional | See [Luxon format](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) | Format of the date at the top of the day. This is not escaped, so HTML is allowed here | 1.6.0 |
| `dateFormat` | string | `cccc d LLLL yyyy` | See [Luxon format](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) | Format of the date in event details | 1.0.0 |
| `timeFormat` | string | `HH:mm` | See [Luxon format](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) | Format of the time | 1.0.0 |
| `locale` | string | `en` | Any locale string supported by Luxon | Locale used for day and month texts | 1.1.0 |
| `locationLink` | string | `https://www.google.com/maps/search/?api=1&query=` | Any URL | Link used for event location in the detail popup | 1.1.0 |
| `showLocation` | boolean | false | `false` \| `true` | Show event location in overview | 1.3.0 |
| `hidePastEvents` | boolean | false | `false` \| `true` | Do not show past events | 1.3.0 |
| `hideDaysWithoutEvents` | boolean | false | `false` \| `true` | Do not show days without events, except for today | 1.4.0 |
| `hideTodayWithoutEvents` | boolean | false | `false` \| `true` | Also do not show today without events if `hideDaysWithoutEvents` is set | 1.8.0 |
| `filter` | string | optional | Any regular expression | Remove events that match the regular expression | 1.7.0 |

### Calendars

| Name | Type | Default | Supported options | Description | Version |
|----------|--------|--------------|------------------------|-----------------------------------------|---------|
| `entity` | string | **Required** | `calendar.my_calendar` | Entity ID | 1.0.0 |
| `name` | string | optional | Any text | Name of the calendar | 1.7.0 |
| `color` | string | optional | Any CSS color | Color used for events from the calendar | 1.0.0 |
| Name | Type | Default | Supported options | Description | Version |
|----------------|---------|--------------|------------------------|-------------------------------------------------|---------|
| `entity` | string | **Required** | `calendar.my_calendar` | Entity ID | 1.0.0 |
| `name` | string | optional | Any text | Name of the calendar | 1.7.0 |
| `color` | string | optional | Any CSS color | Color used for events from the calendar | 1.0.0 |
| `filter` | string | optional | Any regular expression | Remove events that match the regular expression | 1.8.0 |
| `hideInLegend` | boolean | false | `false` \| `true` | Do not show the calendar in the legend | 1.8.0 |

### Texts

Expand All @@ -103,6 +107,9 @@ Custom Home Assistant card displaying a responsive overview of multiple days wit
| `friday` | string | Name of Friday based on locale | Any text | Text used to override Fridays | 1.1.0 |
| `saturday` | string | Name of Saturday based on locale | Any text | Text used to override Saturdays | 1.1.0 |

### Actions
See [Actions documentation](https://www.home-assistant.io/dashboards/actions/). Currently only the tab action is supported.

### Weather

| Name | Type | Default | Supported options | Description | Version |
Expand Down
Loading

0 comments on commit 395343f

Please sign in to comment.