Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a095522
feat: add event creation from day cells
Mar 6, 2026
cb50747
fix: move add-event button next to day number, improve visibility
Mar 6, 2026
ae3eb2b
fix: make add-event button bigger and more visible
Mar 6, 2026
19dbd71
fix: move add-event button to bottom-right, make it discreet
Mar 6, 2026
6f6bd8b
fix: make add-event button bigger and prevent event overlap
Mar 6, 2026
e4b6177
fix: align add-event buttons at bottom-right of each day cell
Mar 6, 2026
872fa39
fix: add background to + button so events don't cover it
Mar 6, 2026
7283e52
fix: place + button below events in normal flow
Mar 6, 2026
a36b8dc
fix: align + buttons using flexbox column with margin-top auto
Mar 6, 2026
793e994
feat: add event edit and delete from event details dialog
Mar 6, 2026
0bd11af
fix: use WebSocket API for event delete and update
Mar 6, 2026
28ee220
Fix event modification: use reactive form state instead of querySelector
Mar 6, 2026
e29fcb4
Rebuild dist with edit form state management fix
Mar 6, 2026
2c31520
Fix event update: fallback to delete+create when update not supported
Mar 6, 2026
fd3e2ba
Open edit dialog directly on event click, add delete button to edit form
Mar 6, 2026
8d07310
feat: add defaultCalendar config option
Mar 6, 2026
92885c1
feat: display year next to month name in navigation header
Mar 6, 2026
bef5fcd
feat: add display toggle options and current weather header
Mar 6, 2026
e3a4371
Add files via upload
tienou Mar 6, 2026
36ba538
Rename card.png to card_old.png
tienou Mar 6, 2026
11027d8
Rename m9oxaahYZi.png to card.png
tienou Mar 6, 2026
73da7f1
Add files via upload
tienou Mar 6, 2026
8d1cfba
Rename card.png to cardfrrrg.png
tienou Mar 6, 2026
db02e32
Rename cardfrrrg.png to card.png
tienou Mar 6, 2026
f0c3400
Update README.md
tienou Mar 6, 2026
5629937
feat: add theme system with Skylight theme option
Mar 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.idea/
.parcel-cache/
node_modules/
dist/week-planner-card.js
dist/week-planner-card.js.map

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Custom Home Assistant card displaying a responsive overview of multiple days with events from one or multiple calendars

![Example Week Planner Cards](examples/card.png)
![Example Week Planner Cards](examples/m9oxaahYZi.png)

## Table of Content

Expand Down
1,091 changes: 1,091 additions & 0 deletions dist/week-planner-card.js

Large diffs are not rendered by default.

Binary file modified examples/card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/card_old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/m9oxaahYZi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "week-planner-card",
"version": "1.14.1",
"version": "1.0.12",
"description": "Custom Home Assistant card to display events for a number of days from one or several calendars.",
"source": "src/index.js",
"module": "dist/week-planner-card.js",
Expand Down
501 changes: 463 additions & 38 deletions src/card.js

Large diffs are not rendered by default.

253 changes: 252 additions & 1 deletion src/card.styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,119 @@ export default css`
--weather-icon-size: 20px;
--weather-temperature-font-size: 0.8em;
}


/* --- Skylight theme --- */
ha-card.skylight {
--event-border-width: 0px;
--event-border-radius: 10px;
--event-spacing: 6px;
--event-padding: 10px 12px;
--events-margin-top: 8px;
--day-date-number-font-size: 1.1em;
--day-date-text-font-size: 1em;
}

ha-card.compact.skylight {
--event-border-radius: 8px;
--event-padding: 4px 8px;
}

ha-card.skylight .container .day .date {
display: flex;
align-items: baseline;
gap: 8px;
}

ha-card.skylight .container .day .date .skylight-day-header {
display: flex;
align-items: baseline;
gap: 8px;
width: 100%;
}

ha-card.skylight .container .day .date .day-label {
font-size: 1.1em;
font-weight: 700;
}

ha-card.skylight .container .day .date .add-event-text {
font-size: 0.85em;
color: var(--secondary-text-color, #888);
cursor: pointer;
opacity: 0.6;
transition: opacity 0.2s;
white-space: nowrap;
margin-left: auto;
}

ha-card.skylight .container .day .date .add-event-text:hover {
opacity: 1;
color: var(--primary-color, #03a9f4);
}

ha-card.skylight .container .day .add-event {
display: none;
}

ha-card.skylight .container .day .events .event {
border-left: none;
border-radius: var(--event-border-radius);
background-color: color-mix(in srgb, var(--event-bg-tint, #888) 15%, var(--card-background-color, white) 85%);
}

ha-card.skylight .container .day .events .event .additionalColor {
display: none;
}

ha-card.skylight .container .day .events .event .calendar-dot {
width: 10px;
height: 10px;
min-width: 10px;
border-radius: 50%;
background-color: var(--dot-color, var(--divider-color, #888));
align-self: center;
margin-right: 4px;
flex-shrink: 0;
}

ha-card.skylight .container .day .events .none,
ha-card.skylight .container .day .events .more {
border-radius: var(--event-border-radius);
background-color: transparent;
}

.card-header-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}

.card-header-row .card-title {
margin: 0;
}

.current-weather {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
font-size: var(--weather-temperature-font-size);
}

.current-weather .icon {
display: inline-block;
vertical-align: middle;
background-size: cover;
width: var(--weather-icon-size);
height: var(--weather-icon-size);
}

.current-weather .icon img {
max-width: var(--weather-icon-size);
max-height: var(--weather-icon-size);
}

.errors {
white-space: pre-line;
}
Expand Down Expand Up @@ -144,6 +256,8 @@ export default css`

.container .day {
position: relative;
display: flex;
flex-direction: column;
width: calc((100% - (var(--days-columns) - 1) * var(--days-spacing)) / var(--days-columns));
margin: 0 0 var(--days-spacing) 0;
}
Expand All @@ -162,6 +276,34 @@ export default css`
font-size: var(--day-date-text-font-size);
}

.container .day.header .date .text {
font-size: var(--day-header-font-size, var(--day-date-text-font-size));
color: var(--day-header-color, var(--primary-text-color));
font-weight: bold;
text-transform: capitalize;
}

.container .day .add-event {
display: flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border-radius: 50%;
cursor: pointer;
opacity: 0.3;
transition: opacity 0.2s;
color: var(--primary-text-color);
--mdc-icon-size: 18px;
margin-left: auto;
margin-top: auto;
padding-top: 4px;
}

.container .day .add-event:hover {
opacity: 0.8;
}

.container .day .weather {
position: absolute;
top: 0;
Expand Down Expand Up @@ -288,6 +430,115 @@ export default css`
padding-top: 16px;
}

ha-dialog .event-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid var(--divider-color, #e0e0e0);
}

ha-dialog .event-actions .btn {
display: flex;
align-items: center;
gap: 4px;
padding: 8px 16px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.9em;
--mdc-icon-size: 16px;
}

ha-dialog .event-actions .btn-edit {
background-color: var(--primary-color, #03a9f4);
color: var(--text-primary-color, #fff);
}

ha-dialog .event-actions .btn-delete {
background-color: var(--error-color, #db4437);
color: #fff;
}

ha-dialog .event-actions .btn:hover {
opacity: 0.9;
}

.create-event-form {
padding: 8px 0;
}

.create-event-form .form-row {
margin-bottom: 12px;
}

.create-event-form .form-row label {
display: block;
margin-bottom: 4px;
font-size: 0.9em;
color: var(--secondary-text-color, #aaaaaa);
}

.create-event-form .form-input {
width: 100%;
padding: 8px;
border: 1px solid var(--divider-color, #e0e0e0);
border-radius: 4px;
background-color: var(--card-background-color, #fff);
color: var(--primary-text-color);
font-size: 1em;
box-sizing: border-box;
}

.create-event-form .form-input:focus {
outline: none;
border-color: var(--primary-color, #03a9f4);
}

.create-event-form .form-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 16px;
}

.create-event-form .btn {
padding: 8px 16px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.9em;
}

.create-event-form .btn-delete {
display: flex;
align-items: center;
gap: 4px;
background-color: var(--error-color, #db4437);
color: #fff;
margin-right: auto;
--mdc-icon-size: 16px;
}

.create-event-form .btn-delete:hover {
opacity: 0.9;
}

.create-event-form .btn-cancel {
background-color: transparent;
color: var(--primary-text-color);
}

.create-event-form .btn-submit {
background-color: var(--primary-color, #03a9f4);
color: var(--text-primary-color, #fff);
}

.create-event-form .btn-submit:hover {
opacity: 0.9;
}

@keyframes loader {
0% {
transform: rotate(0deg);
Expand Down
15 changes: 15 additions & 0 deletions src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ export class WeekPlannerCardEditor extends LitElement {
${this.addTextField('filter', 'Filter events (regex)')}
${this.addTextField('filterText', 'Filter event text (regex)')}
${this.addBooleanField('combineSimilarEvents', 'Combine similar events')}
${this.addBooleanField('showDayName', 'Show day name')}
${this.addBooleanField('showDate', 'Show date in event details')}
${this.addBooleanField('showTime', 'Show time')}
${this.addBooleanField('showCalendarName', 'Show calendar name in event details')}
${this.addBooleanField('showTitle', 'Show title in overview', true)}
${this.addBooleanField('showDescription', 'Show description in overview')}
${this.addBooleanField('showLocation', 'Show location in overview')}
Expand All @@ -163,6 +167,8 @@ export class WeekPlannerCardEditor extends LitElement {
'Weather',
html`
${this.addEntityPickerField('weather.entity', 'Weather entity', ['weather'])}
${this.addBooleanField('showCurrentWeather', 'Show current weather in header')}
${this.addBooleanField('showWeather', 'Show weather in calendar', true)}
${this.addBooleanField('weather.showCondition', 'Show condition icon')}
${this.addBooleanField('weather.showTemperature', 'Show temperature')}
${this.addBooleanField('weather.showLowTemperature', 'Show low temperature')}
Expand All @@ -184,6 +190,15 @@ export class WeekPlannerCardEditor extends LitElement {
${this.addExpansionPanel(
'Appearance',
html`
${this.addSelectField('theme', 'Theme', [
{
value: 'default',
label: 'Default',
}, {
value: 'skylight',
label: 'Skylight',
}
], true)}
${this.addBooleanField('noCardBackground', 'No card background')}
${this.addTextField('eventBackground', 'Override events background color')}
${this.addBooleanField('compact', 'Compact mode')}
Expand Down