Skip to content

Commit 168b528

Browse files
authoredDec 3, 2024
Merge pull request #212 from FamousWolf/dev
[MERGE] Changes for version 1.11.0
2 parents aef1328 + 752410d commit 168b528

File tree

6 files changed

+863
-649
lines changed

6 files changed

+863
-649
lines changed
 

‎README.md

+50-29
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Custom Home Assistant card displaying a responsive overview of multiple days wit
2828
### HACS (Recommended)
2929

3030
1. Make sure [HACS](https://hacs.xyz) is installed and working.
31-
2. Add this repository (https://github.com/FamousWolf/week-planner-card) via [HACS Custom repositories](https://hacs.xyz/docs/faq/custom_repositories)
32-
3. Download and install using HACS
31+
2. Add this repository (https://github.com/FamousWolf/week-planner-card) via [HACS Custom repositories](https://hacs.xyz/docs/faq/custom_repositories). Type should be `Dashboard`.
32+
3. Download and install using HACS.
3333

3434
### Manual
3535

@@ -39,14 +39,16 @@ Custom Home Assistant card displaying a responsive overview of multiple days wit
3939
Add:
4040
```yaml
4141
resources:
42-
- url: /local/week-planner-card.js?version=1.10.1
42+
- url: /local/week-planner-card.js?version=1.11.0
4343
type: module
4444
```
4545
- **Using the graphical editor**
4646
1. Make sure advanced mode is enabled in your user profile
47-
2. Navigate to Configuration -> Lovelace Dashboards -> Resources Tab. Hit orange (+) icon
48-
3. Enter URL `/local/week-planner-card.js` and select type "JavaScript Module".
49-
4. Restart Home Assistant.
47+
2. Navigate to "Settings" -> "Dashboards".
48+
3. Click on the 3 vertical dots in the top right corner and select "Resources".
49+
4. Click on the "Add resource" button in the bottom right corner.
50+
5. Enter URL `/local/week-planner-card.js` and select type "JavaScript Module".
51+
6. Restart Home Assistant.
5052

5153

5254
## Configuration
@@ -58,6 +60,8 @@ Custom Home Assistant card displaying a responsive overview of multiple days wit
5860
| `type` | string | **Required** | `custom:week-planner-card` | Type of the card | 1.0.0 |
5961
| `title` | string | optional | Any string | Card title | 1.6.0 |
6062
| `days` | number \| string | 7 | Any positive integer number \| `month` | The number of days to show | 1.0.0 |
63+
| `maxEvents` | number | 0 | Any positive integer number | The maximum number of events to show (0 is no maximum) | 1.11.0 |
64+
| `maxDayEvents` | number | 0 | Any positive integer number | The maximum number of events to show per day (0 is no maximum) | 1.11.0 |
6165
| `startingDay` | string | `today` | `today` \| `tomorrow` \| `yesterday` \| `sunday` \| `monday` \| `tuesday` \| `wednesday` \| `thursday` \| `friday` \| `saturday` \| `month` | Day to start with | 1.2.0 |
6266
| `startingDayOffset` | number | 0 | Any integer number | Add or subtract days from starting day | 1.7.0 |
6367
| `hideWeekend` | boolean | false | `false` \| `true` | Do not show Saturday and Sunday | 1.2.0 |
@@ -74,6 +78,8 @@ Custom Home Assistant card displaying a responsive overview of multiple days wit
7478
| `timeFormat` | string | `HH:mm` | See [Luxon format](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) | Format of the time | 1.0.0 |
7579
| `locale` | string | `en` | Any locale string supported by Luxon | Locale used for day and month texts | 1.1.0 |
7680
| `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 |
81+
| `showTitle` | boolean | true | `false` \| `true` | Show event title in overview | 1.11.0 |
82+
| `showDescription` | boolean | false | `false` \| `true` | Show event description in overview | 1.11.0 |
7783
| `showLocation` | boolean | false | `false` \| `true` | Show event location in overview | 1.3.0 |
7884
| `hidePastEvents` | boolean | false | `false` \| `true` | Do not show past events | 1.3.0 |
7985
| `hideDaysWithoutEvents` | boolean | false | `false` \| `true` | Do not show days without events, except for today | 1.4.0 |
@@ -82,35 +88,39 @@ Custom Home Assistant card displaying a responsive overview of multiple days wit
8288
| `filterText` | string | optional | Any regular expression | Remove text from events | 1.10.0 |
8389
| `combineSimilarEvents` | boolean | false | `false` \| `true` | Combine events with the same start date/time, end date/time and title | 1.9.0 |
8490
| `showLegend` | boolean | false | `false` \| `true` | Show calendar legend | 1.7.0 |
91+
| `legendToggle` | boolean | false | `false` \| `true` | Toggle calendars by clicking on the legend | 1.11.0 |
92+
| `columns` | object | optional | See [Columns](#columns) | Configuration to override the number of columns | 1.11.0 |
8593

8694
### Calendars
8795

88-
| Name | Type | Default | Supported options | Description | Version |
89-
|----------------|---------|--------------|------------------------|-------------------------------------------------|---------|
90-
| `entity` | string | **Required** | `calendar.my_calendar` | Entity ID | 1.0.0 |
91-
| `name` | string | optional | Any text | Name of the calendar | 1.7.0 |
92-
| `color` | string | optional | Any CSS color | Color used for events from the calendar | 1.0.0 |
93-
| `icon` | string | optional | Any icon | Icon used for events from the calendar | 1.10.0 |
94-
| `filter` | string | optional | Any regular expression | Remove events that match the regular expression | 1.8.0 |
95-
| `filterText` | string | optional | Any regular expression | Remove text from events | 1.10.0 |
96-
| `hideInLegend` | boolean | false | `false` \| `true` | Do not show the calendar in the legend | 1.8.0 |
96+
| Name | Type | Default | Supported options | Description | Version |
97+
|-------------------|---------|--------------|------------------------|--------------------------------------------------------|---------|
98+
| `entity` | string | **Required** | `calendar.my_calendar` | Entity ID | 1.0.0 |
99+
| `name` | string | optional | Any text | Name of the calendar | 1.7.0 |
100+
| `color` | string | optional | Any CSS color | Color used for events from the calendar | 1.0.0 |
101+
| `icon` | string | optional | Any icon | Icon used for events from the calendar | 1.10.0 |
102+
| `eventTitleField` | string | optional | Any text | Name of the title field for events (usually `summary`) | 1.11.0 |
103+
| `filter` | string | optional | Any regular expression | Remove events that match the regular expression | 1.8.0 |
104+
| `filterText` | string | optional | Any regular expression | Remove text from events | 1.10.0 |
105+
| `hideInLegend` | boolean | false | `false` \| `true` | Do not show the calendar in the legend | 1.8.0 |
97106

98107
### Texts
99108

100-
| Name | Type | Default | Supported options | Description | Version |
101-
|-------------|--------|-----------------------------------|-------------------|---------------------------------------------------------------------------------|---------|
102-
| `fullDay` | string | `Entire day` | Any text | Text shown for full day events instead of time | 1.0.0 |
103-
| `noEvents` | string | `No events` | Any text | Text shown when there are no events for a day | 1.0.0 |
104-
| `today` | string | `Today` | Any text | Text shown for today instead of the week day. Set to empty to show week day | 1.0.0 |
105-
| `tomorrow` | string | `Tomorrow` | Any text | Text shown for tomorrow instead of the week day. Set to empty to show week day | 1.0.0 |
106-
| `yesterday` | string | `Yesterday` | Any text | Text shown for yesterday instead of the week day. Set to empty to show week day | 1.2.0 |
107-
| `sunday` | string | Name of Sunday based on locale | Any text | Text used to override Sundays | 1.1.0 |
108-
| `monday` | string | Name of Monday based on locale | Any text | Text used to override Mondays | 1.1.0 |
109-
| `tuesday` | string | Name of Tuesday based on locale | Any text | Text used to override Tuesdays | 1.1.0 |
110-
| `wednesday` | string | Name of Wednesday based on locale | Any text | Text used to override Wednesdays | 1.1.0 |
111-
| `thursday` | string | Name of Thursday based on locale | Any text | Text used to override Thursdays | 1.1.0 |
112-
| `friday` | string | Name of Friday based on locale | Any text | Text used to override Fridays | 1.1.0 |
113-
| `saturday` | string | Name of Saturday based on locale | Any text | Text used to override Saturdays | 1.1.0 |
109+
| Name | Type | Default | Supported options | Description | Version |
110+
|--------------|--------|-----------------------------------|-------------------|---------------------------------------------------------------------------------|---------|
111+
| `fullDay` | string | `Entire day` | Any text | Text shown for full day events instead of time | 1.0.0 |
112+
| `noEvents` | string | `No events` | Any text | Text shown when there are no events for a day | 1.0.0 |
113+
| `moreEvents` | string | `More events` | Any text | Text shown when there are more events for a day | 1.11.0 |
114+
| `today` | string | `Today` | Any text | Text shown for today instead of the week day. Set to empty to show week day | 1.0.0 |
115+
| `tomorrow` | string | `Tomorrow` | Any text | Text shown for tomorrow instead of the week day. Set to empty to show week day | 1.0.0 |
116+
| `yesterday` | string | `Yesterday` | Any text | Text shown for yesterday instead of the week day. Set to empty to show week day | 1.2.0 |
117+
| `sunday` | string | Name of Sunday based on locale | Any text | Text used to override Sundays | 1.1.0 |
118+
| `monday` | string | Name of Monday based on locale | Any text | Text used to override Mondays | 1.1.0 |
119+
| `tuesday` | string | Name of Tuesday based on locale | Any text | Text used to override Tuesdays | 1.1.0 |
120+
| `wednesday` | string | Name of Wednesday based on locale | Any text | Text used to override Wednesdays | 1.1.0 |
121+
| `thursday` | string | Name of Thursday based on locale | Any text | Text used to override Thursdays | 1.1.0 |
122+
| `friday` | string | Name of Friday based on locale | Any text | Text used to override Fridays | 1.1.0 |
123+
| `saturday` | string | Name of Saturday based on locale | Any text | Text used to override Saturdays | 1.1.0 |
114124

115125
### Actions
116126
See [Actions documentation](https://www.home-assistant.io/dashboards/actions/). Currently only the tab action is supported.
@@ -125,6 +135,17 @@ See [Actions documentation](https://www.home-assistant.io/dashboards/actions/).
125135
| `showTemperature` | boolean | false | `false` \| `true` | Show temperature | 1.1.0 |
126136
| `showLowTemperature` | boolean | false | `false` \| `true` | Show low temperature | 1.1.0 |
127137

138+
### Columns
139+
By default, the columns are based on the width of the card. You can use these settings to override the default number of columns.
140+
141+
| Name | Type | Default | Supported options | Description | Version |
142+
|--------------|---------|----------|---------------------|---------------------------------------------------------|---------|
143+
| `extraLarge` | number | optional | Any positive number | Number of columns when the card width is >= 1920 pixels | 1.11.0 |
144+
| `large` | number | optional | Any positive number | Number of columns when the card width is >= 1280 pixels | 1.11.0 |
145+
| `medium` | number | optional | Any positive number | Number of columns when the card width is >= 1024 pixels | 1.11.0 |
146+
| `small` | number | optional | Any positive number | Number of columns when the card width is >= 640 pixels | 1.11.0 |
147+
| `extraSmall` | number | optional | Any positive number | Number of columns when the card width is < 640 pixels | 1.11.0 |
148+
128149
## Custom styling using cardmod
129150

130151
Like with most cards, you can add custom styling to this card using [card_mod](https://github.com/thomasloven/lovelace-card-mod). To make it easier to add custom styles to days and/or events, there are several classes that days and events can have. Additionally, there are data attributes you can use in CSS selectors.

0 commit comments

Comments
 (0)