Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # PUBLIC SHARING COPY - replace example_wall_user and calendar.*_example IDs
- # with your actual Home Assistant username and calendar entity IDs before use.
- kiosk_mode:
- user_settings:
- - users:
- - example_wall_user
- hide_header: true
- hide_sidebar: true
- button_card_templates:
- fx:
- show_icon: false
- show_name: false
- show_state: false
- tap_action:
- action: none
- hold_action:
- action: none
- variables:
- cal: |
- [[[ return {
- 'calendar.family_example': {c: '#1e6f7a', i: 'mdi:account-group'},
- 'calendar.child_example': {c: '#7a3a30', i: 'mdi:account'},
- 'calendar.sports_team_example': {c: '#3b5a80', i: 'mdi:football'},
- 'calendar.sports_club_example': {c: '#b03a3a', i: 'mdi:soccer'},
- 'calendar.birthdays': {c: '#7d3d68', i: 'mdi:cake-variant'},
- 'calendar.holidays': {c: '#5a5a72', i: 'mdi:flag'},
- 'calendar.holidays_in_united_states': {c: '#5a5a72', i: 'mdi:flag'},
- }; ]]]
- wx: |
- [[[ return {
- 'sunny': 'weather-sunny', 'clear-night': 'weather-night',
- 'partlycloudy': 'weather-partly-cloudy', 'cloudy': 'weather-cloudy',
- 'fog': 'weather-fog', 'rainy': 'weather-rainy', 'pouring': 'weather-pouring',
- 'snowy': 'weather-snowy', 'snowy-rainy': 'weather-snowy-rainy', 'hail': 'weather-hail',
- 'lightning': 'weather-lightning', 'lightning-rainy': 'weather-lightning-rainy',
- 'windy': 'weather-windy', 'windy-variant': 'weather-windy-variant',
- }; ]]]
- styles:
- card:
- - border: none
- - border-radius: 0
- - box-shadow: none
- - height: 100%
- - box-sizing: border-box
- - overflow: hidden
- - font-family: >-
- 'Inter', -apple-system, 'SF Pro Text', 'Segoe UI', Roboto,
- sans-serif
- grid:
- - align-content: stretch
- - height: 100%
- themed:
- template: fx
- variables:
- night: |
- [[[ const m = states['input_select.wall_display_mode']?.state;
- return m === 'Night' || (m !== 'Day' && states['sun.sun']?.state === 'below_horizon'); ]]]
- styles:
- card:
- - background: var(--c-bg)
- - color: var(--c-text)
- - --c-bg: '[[[ return variables.night ? ''#000000'' : ''#ffffff'' ]]]'
- - --c-text: '[[[ return variables.night ? ''#f2f2f7'' : ''#1d1d1f'' ]]]'
- - --c-sub: '[[[ return variables.night ? ''#98989d'' : ''#6e6e73'' ]]]'
- - --c-line: '[[[ return variables.night ? ''#48484a'' : ''#d1d1d6'' ]]]'
- - --c-grp: '[[[ return variables.night ? ''#2c2c2e'' : ''#ffffff'' ]]]'
- - --c-icon: '[[[ return variables.night ? ''#e5e5ea'' : ''#000000'' ]]]'
- views:
- - title: Wall
- path: wall
- type: panel
- background: '#000000'
- cards:
- - type: custom:layout-card
- layout_type: custom:grid-layout
- layout:
- grid-template-columns: calc(20% - 40px) 1fr
- grid-template-rows: 48px minmax(0, 1fr) 40px
- grid-template-areas: |
- "side top"
- "side cal"
- "side leg"
- grid-gap: 0
- height: 100vh
- margin: 0
- padding: 0
- card_mod:
- style: >
- :host { --masonry-view-card-margin: 0px; display: block; height:
- 100vh; overflow: hidden; container-type: inline-size; }
- cards:
- - type: custom:button-card
- template: fx
- view_layout:
- grid-area: side
- place-self: stretch
- entity: sensor.wall_calendar_events
- triggers_update:
- - sensor.time
- - sensor.wall_weather_daily
- - sensor.wall_chores
- custom_fields:
- side: |
- [[[
- const {cal, wx} = variables;
- const evs = states['sensor.wall_calendar_events']?.attributes?.events || [];
- const fc = states['sensor.wall_weather_daily']?.attributes?.forecast || [];
- const chores = states['sensor.wall_chores']?.attributes?.items || [];
- const esc = s => String(s ?? '').replace(/[&<>"]/g, c => ({'&': '&', '<': '<', '>': '>', '"': '"'}[c]));
- const col = c => cal[c]?.c || '#888';
- const ico = c => cal[c]?.i || 'mdi:calendar';
- const now = new Date();
- const mid = d => new Date(d.getFullYear(), d.getMonth(), d.getDate());
- const addD = (d, n) => new Date(d.getFullYear(), d.getMonth(), d.getDate() + n);
- const key = d => `${d.getFullYear()}-${d.getMonth()}-${d.getDate()}`;
- const parse = s => s.includes('T') ? new Date(s)
- : new Date(+s.slice(0, 4), +s.slice(5, 7) - 1, +s.slice(8, 10));
- const today = mid(now);
- // events grouped by day (all-day events on every day they cover);
- // the same event on two calendars (e.g. both holiday calendars) is shown once
- const byDay = {};
- const seen = new Set();
- const add = (d, e) => (byDay[key(d)] = byDay[key(d)] || []).push(e);
- for (const e of evs) {
- const id = `${e.summary}|${e.start}|${e.end}`;
- if (seen.has(id)) continue;
- seen.add(id);
- const allDay = !e.start.includes('T');
- const ev = {...e, s: parse(e.start), en: parse(e.end), allDay};
- if (!allDay) { add(mid(ev.s), ev); continue; }
- const last = addD(mid(ev.en), -1);
- for (let d = mid(ev.s), n = 0; d <= last && n < 62; d = addD(d, 1), n++) add(d, ev);
- }
- // title
- const y = now.getFullYear(), m = now.getMonth();
- const title = `<div class="title"><span class="m">${now.toLocaleDateString('en-US', {month: 'long'})}</span>`
- + `<span class="y">${y}</span><span class="nav">‹ ›</span></div>`;
- // mini month: 6 weeks with up to 3 event dots per day
- const first = new Date(y, m, 1);
- const start = addD(first, -first.getDay());
- const DOW = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
- let mini = `<div class="mrow mh">`
- + DOW.map((d, i) => `<div class="${i === now.getDay() ? 'cur' : ''}">${d}</div>`).join('') + `</div>`;
- for (let w = 0; w < 6; w++) {
- const ws = addD(start, w * 7);
- const thisWeek = today >= ws && today < addD(ws, 7);
- mini += `<div class="mrow${thisWeek ? ' wk' : ''}">`;
- for (let i = 0; i < 7; i++) {
- const d = addD(ws, i);
- const dots = [...new Set((byDay[key(d)] || []).map(e => e.cal))].slice(0, 3)
- .map(c => `<b style="background:${col(c)}"></b>`).join('');
- mini += `<div class="mn${d.getMonth() !== m ? ' out' : ''}${+d === +today ? ' today' : ''}">`
- + `<span>${d.getDate()}</span><i>${dots}</i></div>`;
- }
- mini += `</div>`;
- }
- // agenda: today, tomorrow + the next 2 days. Items that don't fit above the
- // Chores list are hidden whole — a longer Chores list shrinks the agenda.
- const AGENDA_DAYS = 4;
- const hm = d => `${d.getHours() % 12 || 12}:${String(d.getMinutes()).padStart(2, '0')}`;
- const ap = d => d.getHours() < 12 ? 'AM' : 'PM';
- const range = (s, e) => ap(s) === ap(e) ? `${hm(s)} - ${hm(e)} ${ap(e)}` : `${hm(s)} ${ap(s)} - ${hm(e)} ${ap(e)}`;
- const md = d => `${d.getMonth() + 1}/${d.getDate()}/${String(d.getFullYear()).slice(2)}`;
- const items = [];
- for (let i = 0; i < AGENDA_DAYS; i++) {
- const d = addD(today, i);
- const list = (byDay[key(d)] || []).filter(e => i > 0 || e.allDay || e.en > now)
- .sort((a, b) => (b.allDay - a.allDay) || (a.s - b.s));
- const label = i === 0 ? 'Today' : i === 1 ? 'Tomorrow' : d.toLocaleDateString('en-US', {weekday: 'long'});
- const f = fc.find(f => key(mid(new Date(f.datetime))) === key(d));
- const fw = f ? `<span class="wx">${Math.round(f.temperature)}°/${Math.round(f.templow)}°`
- + `<ha-icon icon="mdi:${wx[f.condition] || 'weather-cloudy'}"></ha-icon></span>` : '';
- const head = `<div class="dh${i === 0 ? ' now' : ''}"><span><b>${label}</b> ${md(d)}</span>${fw}</div>`;
- const lines = list.map(e => {
- const loc = e.location ? `<div class="tl">${esc(e.location)}</div>` : '';
- return e.allDay
- ? `<div class="ad"><span style="background:${col(e.cal)}">${esc(e.summary)}</span>${loc}</div>`
- : `<div class="te"><b style="background:${col(e.cal)}"><ha-icon icon="${ico(e.cal)}"></ha-icon></b>`
- + `<div class="tx"><div class="tt">${range(e.s, e.en)}</div><div class="tn">${esc(e.summary)}</div>${loc}</div></div>`;
- });
- if (!lines.length) lines.push(`<div class="none">${i === 0 ? 'No more events today' : 'Nothing scheduled'}</div>`);
- items.push(`<div>${head}${lines[0]}</div>`, ...lines.slice(1)); // day header stays glued to its first item
- }
- // chores
- const MAX_TODO = 10;
- const todo = !chores.length ? `<div class="none">All done ✓</div>`
- : chores.slice(0, MAX_TODO).map(t => `<div class="td"><b></b><span>${esc(t)}</span></div>`).join('')
- + (chores.length > MAX_TODO ? `<div class="none">+${chores.length - MAX_TODO} more</div>` : '');
- return `${title}<div class="mc">${mini}</div><div class="ag">${items.join('')}</div>`
- + `<div class="chh">Chores</div><div class="chl">${todo}</div>`;
- ]]]
- styles:
- card:
- - width: calc(20cqw - 40px)
- - background: '#000000'
- - color: '#fff'
- - padding: 12px 16px 10px
- grid:
- - grid-template-areas: '"side"'
- extra_styles: >
- #side { width: 100%; height: 100%; display: flex; flex-direction:
- column; text-align: left; white-space: normal; }
- /* month title */
- .title { display: flex; align-items: baseline; gap: 8px;
- font-size: 1.9rem; font-weight: 700; letter-spacing: -0.01em;
- padding: 4px 2px 10px; }
- .title .y { color: #ff453a; font-weight: 600; }
- .title .nav { margin-left: auto; color: #8e8e93; font-size:
- 1.5rem; font-weight: 400; }
- /* mini month */
- .mc { margin-bottom: 10px; }
- .mrow { display: grid; grid-template-columns: repeat(7, 1fr);
- align-items: start; text-align: center; border-radius: 8px;
- padding: 2px 0; }
- .mrow.wk { background: #3a3a3c; }
- .mh { font-size: 0.7rem; font-weight: 600; color: #8e8e93;
- padding-bottom: 4px; }
- .mh .cur { color: #0a84ff; }
- .mn { display: flex; flex-direction: column; align-items: center;
- height: 31px; }
- .mn span { width: 24px; height: 24px; line-height: 24px;
- border-radius: 50%; font-size: 0.9rem; font-weight: 600; }
- .mn.out span { color: #636366; font-weight: 400; }
- .mn.today span { background: #0a84ff; color: #fff; }
- .mn i { display: flex; gap: 2px; height: 5px; margin-top: 1px; }
- .mn i b { width: 4px; height: 4px; border-radius: 50%; }
- /* agenda + chores: column-wrap with a huge gap pushes overflow
- out of view, so items hide whole */
- .ag { flex: 1; min-height: 0; display: flex; flex-direction:
- column; flex-wrap: wrap; align-content: flex-start;
- column-gap: 400px; overflow: hidden; border-top: 1px solid #3a3a3c; }
- .ag > *, .chl > * { width: 100%; flex: none; }
- .dh { display: flex; justify-content: space-between; align-items:
- center; font-size: 0.92rem; color: #aeaeb2; margin: 12px 0 7px; }
- .dh b { text-transform: uppercase; font-weight: 700; color:
- #e5e5ea; margin-right: 4px; }
- .dh.now, .dh.now b { color: #0a84ff; }
- .dh .wx { display: flex; align-items: center; gap: 6px; color:
- #e5e5ea; font-weight: 600; }
- .dh ha-icon { --mdc-icon-size: 22px; color: #e5e5ea; }
- /* timed events */
- .te { display: flex; gap: 10px; align-items: flex-start; margin: 0
- 0 9px 2px; }
- .te > b { flex: none; width: 20px; height: 20px; border-radius:
- 50%; margin-top: 1px; display: flex; align-items: center;
- justify-content: center; }
- .te > b ha-icon { --mdc-icon-size: 13px; width: 13px; height:
- 13px; display: flex; color: #fff; }
- .tx { min-width: 0; }
- .tt { font-size: 0.82rem; font-weight: 600; color: #aeaeb2; }
- .tn { font-size: 1rem; font-weight: 600; line-height: 1.2; }
- .tl { font-size: 0.8rem; font-weight: 400; color: #8e8e93;
- line-height: 1.25; margin-top: 1px;
- white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
- /* all-day events */
- .ad { margin: 0 0 8px; }
- .ad .tl { margin-top: 3px; }
- .ad span { display: inline-block; max-width: 100%; padding: 2px
- 8px; border-radius: 4px; font-size: 0.95rem; font-weight: 600;
- white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
- .none { color: #636366; font-size: 0.9rem; margin-bottom: 6px; }
- /* chores */
- .chh { border-top: 1px solid #3a3a3c; padding-top: 9px;
- margin-top: auto; font-size: 0.9rem; font-weight: 700;
- text-transform: uppercase; color: #e5e5ea; }
- .chl { max-height: 48vh; display: flex; flex-direction: column;
- flex-wrap: wrap; align-content: flex-start; column-gap: 400px;
- overflow: hidden; padding-top: 7px; }
- .td { display: flex; gap: 10px; align-items: flex-start;
- margin-bottom: 6px; font-size: 0.95rem; font-weight: 600; }
- .td > b { flex: none; width: 10px; height: 10px; border: 1.5px
- solid #0a84ff; border-radius: 50%; margin-top: 4px; } /* CHORE
- CIRCLE colour */
- - type: custom:button-card
- template: themed
- view_layout:
- grid-area: top
- place-self: stretch
- entity: sensor.time
- triggers_update:
- - sensor.wall_calendar_events
- - sun.sun
- - input_select.wall_display_mode
- custom_fields:
- bar: |
- [[[
- // HIDE IDLE POINTER: after IDLE_MS without movement the mouse pointer is hidden;
- // any movement, tap or key press brings it straight back.
- // Self-healing: re-checked on every clock tick, so if the page re-renders and drops
- // the hiding layer (or the listeners), it is put back within a minute.
- const IDLE_MS = 2000;
- const W = window.__wallIdle = window.__wallIdle || {};
- if (!W.style || !document.head.contains(W.style)) {
- W.style = document.createElement('style');
- W.style.textContent = 'html.wall-idle, html.wall-idle * { cursor: none !important; }';
- document.head.appendChild(W.style);
- }
- if (!W.veil || !document.body.contains(W.veil)) {
- W.veil = document.createElement('div');
- W.veil.style.cssText = 'position:fixed;inset:0;z-index:2147483647;cursor:none;background:transparent;display:none';
- document.body.appendChild(W.veil);
- }
- if (!W.wake) {
- W.wake = () => {
- W.veil.style.display = 'none';
- document.documentElement.classList.remove('wall-idle');
- clearTimeout(W.t);
- W.t = setTimeout(() => {
- W.veil.style.display = 'block';
- document.documentElement.classList.add('wall-idle');
- }, IDLE_MS);
- };
- ['mousemove', 'pointermove', 'pointerdown', 'touchstart', 'keydown', 'wheel'].forEach(ev =>
- window.addEventListener(ev, W.wake, {passive: true, capture: true}));
- W.wake();
- }
- const {cal} = variables;
- const evs = states['sensor.wall_calendar_events']?.attributes?.events || [];
- const esc = s => String(s ?? '').replace(/[&<>"]/g, c => ({'&': '&', '<': '<', '>': '>', '"': '"'}[c]));
- const OUTLINE = {'mdi:cake-variant': 'mdi:cake-variant-outline', 'mdi:flag': 'mdi:flag-outline'};
- const badge = c => { const i = cal[c]?.i || 'mdi:calendar'; return `<span class="badge" style="color:${variables.night ? 'var(--c-icon)' : (cal[c]?.c || 'var(--c-icon)')}"><ha-icon icon="${OUTLINE[i] || i}"></ha-icon></span>`; };
- const now = new Date();
- const parse = s => s.includes('T') ? new Date(s) : new Date(+s.slice(0, 4), +s.slice(5, 7) - 1, +s.slice(8, 10));
- const mid = d => new Date(d.getFullYear(), d.getMonth(), d.getDate());
- const dd = d => Math.round((mid(d) - mid(now)) / 864e5);
- // COUNTDOWNS: next birthday, then next holiday (within 120 days)
- const nextOf = cals => evs
- .filter(x => cals.includes(x.cal))
- .map(x => ({...x, d: dd(parse(x.start))}))
- .filter(x => x.d >= 0 && x.d <= 120)
- .sort((a, b) => a.d - b.d)[0];
- const chip = (label, x) => {
- if (!x) return '';
- const name = esc(x.summary.replace(/'s birthday$/i, ''));
- const when = x.d === 0 ? 'today' : x.d === 1 ? 'tomorrow' : `${x.d} days`;
- return `<div class="item"><span class="lbl">${label}</span><span class="chip">${badge(x.cal)}<span class="cn">${name}</span><em>${when}</em></span></div>`;
- };
- const cds = chip('Next Birthday:', nextOf(['calendar.birthdays']))
- + chip('Next Holiday:', nextOf(['calendar.holidays', 'calendar.holidays_in_united_states']));
- // CLOCK
- const time = `${now.getHours() % 12 || 12}:${String(now.getMinutes()).padStart(2, '0')} <span class="ap">${now.getHours() < 12 ? 'AM' : 'PM'}</span>`;
- // empty 3rd column keeps the countdowns centred
- return `<div class="row"><div class="clk">${time}</div><div class="items">${cds}</div><div></div></div>`;
- ]]]
- mode:
- card:
- type: custom:button-card
- entity: input_select.wall_display_mode
- show_icon: false
- show_name: false
- show_state: false
- tap_action:
- action: perform-action
- perform_action: input_select.select_next
- target:
- entity_id: input_select.wall_display_mode
- hold_action:
- action: more-info
- custom_fields:
- seg: |
- [[[
- const m = entity?.state || 'Auto';
- const opts = [['Auto', 'mdi:theme-light-dark'], ['Day', 'mdi:white-balance-sunny'], ['Night', 'mdi:weather-night']];
- return `<div class="sw">${opts.map(([n, i]) =>
- `<span class="${n === m ? 'on' : ''}" title="${n}"><ha-icon icon="${i}"></ha-icon></span>`).join('')}</div>`;
- ]]]
- styles:
- card:
- - background: none
- - border: none
- - box-shadow: none
- - padding: 0
- - border-radius: 6px
- - overflow: visible
- grid:
- - grid-template-areas: '"seg"'
- extra_styles: >
- .sw { display: inline-flex; border: 1px solid var(--c-line);
- border-radius: 6px; overflow: hidden; background:
- var(--c-grp); }
- .sw span { display: flex; align-items: center;
- justify-content: center; width: 30px; height: 26px;
- border-right: 1px solid var(--c-line); color: var(--c-sub); }
- .sw span:last-child { border-right: none; }
- .sw span.on { background: #0a84ff; color: #fff; }
- .sw ha-icon { --mdc-icon-size: 16px; }
- styles:
- card:
- - width: calc(80cqw + 40px)
- - padding: 0 16px
- grid:
- - grid-template-areas: '"bar mode"'
- - grid-template-columns: 1fr auto
- - column-gap: 14px
- extra_styles: >
- #bar { width: 100%; height: 100%; }
- #mode { align-self: center; }
- /* [ clock ] [ Next Birthday · Next Holiday (centred) ] [ — ] [
- mode switch ] */
- .row { display: grid; grid-template-columns: 1fr auto 1fr;
- align-items: center; gap: 24px; height: 100%; }
- /* clock: same style as the sidebar's month title */
- .clk { justify-self: start; font-size: 1.9rem; font-weight: 700;
- letter-spacing: -0.01em; line-height: 1;
- font-variant-numeric: tabular-nums; color: var(--c-text); white-space: nowrap; }
- .clk .ap { color: #ff453a; font-weight: 600; }
- .items { display: flex; align-items: center; justify-content:
- center; gap: 72px; } /* space between Next Birthday and Next
- Holiday */
- .item { display: flex; align-items: center; gap: 6px; flex: none;
- white-space: nowrap; }
- .lbl { font-size: 1.15rem; font-weight: 600; color: var(--c-sub);
- }
- .chip { display: flex; align-items: center; gap: 6px; font-size:
- 1.15rem; font-weight: 600; white-space: nowrap; color:
- var(--c-text); }
- .chip .cn { max-width: 220px; overflow: hidden; text-overflow:
- ellipsis; }
- .chip em { font-style: normal; font-weight: 500; color:
- var(--c-sub); }
- .badge { display: flex; align-items: center; justify-content:
- center; flex: none; color: var(--c-icon); }
- .badge ha-icon { --mdc-icon-size: 26px; width: 26px; height: 26px;
- display: flex; margin: 0; }
- - type: custom:button-card
- template: themed
- view_layout:
- grid-area: leg
- place-self: stretch
- entity: sensor.wall_weather_daily
- triggers_update:
- - weather.pirateweather
- - sun.sun
- - input_select.wall_display_mode
- custom_fields:
- strip: |
- [[[
- const icon = c => `<ha-icon icon="mdi:${variables.wx[c] || 'weather-cloudy'}"></ha-icon>`;
- const r = v => v == null ? '–' : Math.round(v);
- const all = entity?.attributes?.forecast || [];
- const today = all[0] || {};
- const w = states['weather.pirateweather'];
- const a = w?.attributes || {};
- // current conditions + a few words about the day
- const COND = {
- 'sunny': 'Sunny', 'clear-night': 'Clear', 'partlycloudy': 'Partly cloudy', 'cloudy': 'Cloudy',
- 'fog': 'Foggy', 'rainy': 'Rain', 'pouring': 'Heavy rain', 'snowy': 'Snow', 'snowy-rainy': 'Sleet',
- 'hail': 'Hail', 'lightning': 'Thunderstorms', 'lightning-rainy': 'Thunderstorms & rain',
- 'windy': 'Windy', 'windy-variant': 'Windy', 'exceptional': 'Unusual weather',
- };
- const words = [COND[w?.state]];
- const pop = today.precipitation_probability;
- if (pop != null) words.push(pop >= 60 ? `rain likely (${r(pop)}%)` : pop >= 25 ? `${r(pop)}% chance of rain` : 'staying dry');
- const ws = a.wind_speed;
- if (ws != null) words.push(ws < 4 ? 'calm' : ws < 12 ? 'light breeze' : ws < 20 ? `breezy, ${r(ws)} mph` : `windy, ${r(ws)} mph`);
- const now = w ? `<span class="now">${icon(w.state)}<span class="temp">${r(a.temperature)}°</span>`
- + `<span class="hl"><b>H</b> ${r(today.temperature)}° <b>L</b> ${r(today.templow)}°</span>`
- + `<span class="sum">${words.filter(Boolean).join(' · ')}</span></span>` : '';
- const days = all.slice(1, 6).map(f =>
- `<span><em>${new Date(f.datetime).toLocaleDateString('en-US', {weekday: 'short'})}</em>${icon(f.condition)}${r(f.temperature)}°<i>/${r(f.templow)}°</i></span>`
- ).join('');
- return `<div class="grp fc">${now}${days}</div>`;
- ]]]
- styles:
- card:
- - width: calc(80cqw + 40px)
- - border-top: 1px solid var(--c-line)
- - padding: 0
- grid:
- - grid-template-areas: '"strip"'
- - grid-template-columns: 100%
- - justify-items: stretch
- - align-content: center
- extra_styles: >
- #strip { width: 100%; justify-self: stretch; text-align: left; }
- /* one segmented box (like the "‹ Today ›" buttons): current
- conditions fill the left, then 5 forecast days */
- .grp { display: flex; width: 100%; box-sizing: border-box;
- background: var(--c-grp); border: 1px solid var(--c-line);
- border-radius: 6px; overflow: hidden; font-size: 0.88rem; font-weight: 600; color: var(--c-text); }
- .grp > span { flex: none; display: flex; align-items: center;
- justify-content: center; gap: 5px; padding: 0 12px;
- height: 28px; box-sizing: border-box; white-space: nowrap; border-right: 1px solid var(--c-line); }
- .grp > span:last-child { border-right: none; }
- .grp ha-icon { --mdc-icon-size: 20px; width: 20px; height: 20px;
- flex: none; display: flex; margin: 0; color: var(--c-icon); }
- /* current conditions */
- .grp > span.now { flex: 1 1 auto; min-width: 0; justify-content:
- flex-start; gap: 10px; overflow: hidden; }
- .now ha-icon { --mdc-icon-size: 24px; width: 24px; height: 24px; }
- .now > span { flex: none; }
- .now .temp { font-size: 1.35rem; font-weight: 700; }
- .now .hl { font-size: 0.92rem; }
- .now .hl b { color: var(--c-sub); font-weight: 600; }
- .now .sum { flex: 0 1 auto; min-width: 0; font-size: 0.92rem;
- font-weight: 500; color: var(--c-sub); overflow: hidden;
- text-overflow: ellipsis; padding-left: 10px; border-left: 1px solid var(--c-line); }
- /* forecast days: Day [icon] hi/lo */
- .fc em { font-style: normal; color: var(--c-sub); margin-right:
- 2px; }
- .fc i { font-style: normal; color: var(--c-sub); font-weight: 500;
- }
- - type: custom:week-planner-card
- view_layout:
- grid-area: cal
- calendars:
- - entity: calendar.family_example
- name: Family
- color: '#1e6f7a'
- icon: mdi:account-group
- - entity: calendar.child_example
- name: Child
- color: '#7a3a30'
- icon: mdi:account
- - entity: calendar.sports_team_example
- name: Sports Team
- color: '#3b5a80'
- icon: mdi:football
- - entity: calendar.sports_club_example
- name: Sports Club
- color: '#b03a3a'
- icon: mdi:soccer
- - entity: calendar.birthdays
- name: Birthdays
- color: '#7d3d68'
- icon: mdi:cake-variant
- - entity: calendar.holidays
- name: Holidays
- color: '#5a5a72'
- icon: mdi:flag
- - entity: calendar.holidays_in_united_states
- name: US Holidays
- color: '#5a5a72'
- icon: mdi:flag
- days: 35
- startingDay: sunday
- showWeekDayText: false
- maxDayEvents: 5
- replaceTitleText:
- Example Sports Club
- showLegend: false
- combineSimilarEvents: true
- locale: en-US
- texts:
- sunday: SUN
- monday: MON
- tuesday: TUE
- wednesday: WED
- thursday: THU
- friday: FRI
- saturday: SAT
- moreEvents: more…
- noEvents: ''
- fullDay: ''
- today: ''
- tomorrow: ''
- yesterday: ''
- weather:
- entity: weather.pirateweather
- showCondition: true
- showTemperature: false
- columns:
- extraLarge: 7
- large: 7
- medium: 7
- small: 7
- extraSmall: 7
- card_mod:
- style: >
- {# NIGHT MODE: forced Night, or Auto while the sun is down #}
- {% set night = is_state('input_select.wall_display_mode',
- 'Night')
- or (not is_state('input_select.wall_display_mode', 'Day') and is_state('sun.sun', 'below_horizon')) %}
- ha-card {
- --c-bg: {{ '#000000' if night else '#ffffff' }};
- --c-text: {{ '#f2f2f7' if night else '#1d1d1f' }};
- --c-sub: {{ '#98989d' if night else '#6e6e73' }};
- --c-line: {{ '#38383a' if night else '#e5e5ea' }};
- --c-line2: {{ '#48484a' if night else '#d1d1d6' }};
- --c-weekend: {{ '#0d0d0f' if night else '#f6f6f8' }}; /* WEEKENDS */
- --c-outside: {{ '#0c0c0e' if night else '#fafafa' }};
- --c-past: {{ '#636366' if night else '#aeaeb2' }};
- --c-time: {{ '#98989d' if night else '#8e8e93' }};
- --c-pill: transparent;
- --c-pillmix: {{ '45%' if night else '28%' }}; /* how strongly event boxes are tinted */
- --c-pilltxt: {{ '#ffffff' if night else '#000000' }};
- --c-pilltxtmix: {{ '0%' if night else '70%' }}; /* how much calendar colour goes into titles */
- background: var(--c-bg) !important;
- color: var(--c-text);
- border: none !important;
- border-radius: 0 !important;
- box-shadow: none !important;
- padding: 0 !important;
- height: calc(100vh - 48px - 40px);
- overflow: hidden;
- font-family: 'Inter', -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
- --primary-text-color: var(--c-text);
- --secondary-text-color: var(--c-time);
- }
- .card-content { padding: 0 !important; height: 100%; }
- /* real month grid: weekday header row + equal-height weeks */
- .container {
- display: grid !important;
- grid-template-columns: repeat(7, minmax(0, 1fr));
- grid-template-rows: auto;
- grid-auto-rows: minmax(0, 1fr);
- gap: 0 !important;
- height: 100%;
- border-top: 1px solid var(--c-line);
- }
- .container .day {
- position: relative;
- width: auto !important;
- min-height: 0;
- margin: 0 !important;
- padding: 4px 6px;
- box-sizing: border-box;
- overflow: hidden;
- border-right: 1px solid var(--c-line);
- border-bottom: 1px solid var(--c-line);
- }
- .container .day:nth-child(7n) { border-right: none; }
- .day.header { padding: 6px 8px 5px; border-bottom: 1px solid
- var(--c-line2); }
- .day.header .date { justify-content: flex-end; }
- .day.header .date .text { font-size: 0.85rem; font-weight: 600;
- color: var(--c-sub); letter-spacing: 0.02em; }
- .day .date { display: flex; justify-content: flex-end;
- align-items: center; min-height: 28px; }
- .day .date .number { font-size: 1.05rem !important; line-height:
- 1 !important; font-weight: 500; color: var(--c-text); }
- .day:not(.header) .date .text { display: none !important; }
- /* month name on the 1st, like "Nov 1" */
- {% for mo in
- ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
- %}
- .day[data-date="1"][data-month="{{ loop.index }}"] .date
- .number::before { content: "{{ mo }} "; }
- {% endfor %}
- .day[data-date="1"]:not(.today) .date .number { font-weight:
- 700; }
- .day.today .date .number::before { content: none !important; }
- .day.sunday, .day.saturday { background: var(--c-weekend); }
- .day.outside-month { background: var(--c-outside); }
- .day.past .date .number { color: var(--c-past); }
- .day.today { background: transparent; box-shadow: inset 0 0 0
- 2px {{ '#1a8cff' if night else '#ff453a' }}; } /* TODAY
- outline */
- .day.today .date .number {
- display: inline-flex; align-items: center; justify-content: center;
- width: 1.75em; height: 1.75em; border-radius: 50%;
- background: {{ '#1a8cff' if night else '#ff453a' }}; color: #fff; font-weight: 600; /* TODAY circle: blue at night, red by day */
- }
- /* WEATHER ICONS: outline icons, black by day, light at night */
- {% set ic = 'e5e5ea' if night else '000000' %}
- {% set icons = {
- 'sunny': 'M12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,2L14.39,5.42C13.65,5.15 12.84,5 12,5C11.16,5 10.35,5.15 9.61,5.42L12,2M3.34,7L7.5,6.65C6.9,7.16 6.36,7.78 5.94,8.5C5.5,9.24 5.25,10 5.11,10.79L3.34,7M3.36,17L5.12,13.23C5.26,14 5.53,14.78 5.95,15.5C6.37,16.24 6.91,16.86 7.5,17.37L3.36,17M20.65,7L18.88,10.79C18.74,10 18.47,9.23 18.05,8.5C17.63,7.78 17.1,7.15 16.5,6.64L20.65,7M20.64,17L16.5,17.36C17.09,16.85 17.62,16.22 18.04,15.5C18.46,14.77 18.73,14 18.87,13.21L20.64,17M12,22L9.59,18.56C10.33,18.83 11.14,19 12,19C12.82,19 13.63,18.83 14.37,18.56L12,22Z',
- 'clear-night': 'M17.75,4.09L15.22,6.03L16.13,9.09L13.5,7.28L10.87,9.09L11.78,6.03L9.25,4.09L12.44,4L13.5,1L14.56,4L17.75,4.09M21.25,11L19.61,12.25L20.2,14.23L18.5,13.06L16.8,14.23L17.39,12.25L15.75,11L17.81,10.95L18.5,9L19.19,10.95L21.25,11M18.97,15.95C19.8,15.87 20.69,17.05 20.16,17.8C19.84,18.25 19.5,18.67 19.08,19.07C15.17,23 8.84,23 4.94,19.07C1.03,15.17 1.03,8.83 4.94,4.93C5.34,4.53 5.76,4.17 6.21,3.85C6.96,3.32 8.14,4.21 8.06,5.04C7.79,7.9 8.75,10.87 10.95,13.06C13.14,15.26 16.1,16.22 18.97,15.95M17.33,17.97C14.5,17.81 11.7,16.64 9.53,14.5C7.36,12.31 6.2,9.5 6.04,6.68C3.23,9.82 3.34,14.64 6.35,17.66C9.37,20.67 14.19,20.78 17.33,17.97Z',
- 'partlycloudy': 'M12.74,5.47C15.1,6.5 16.35,9.03 15.92,11.46C17.19,12.56 18,14.19 18,16V16.17C18.31,16.06 18.65,16 19,16A3,3 0 0,1 22,19A3,3 0 0,1 19,22H6A4,4 0 0,1 2,18A4,4 0 0,1 6,14H6.27C5,12.45 4.6,10.24 5.5,8.26C6.72,5.5 9.97,4.24 12.74,5.47M11.93,7.3C10.16,6.5 8.09,7.31 7.31,9.07C6.85,10.09 6.93,11.22 7.41,12.13C8.5,10.83 10.16,10 12,10C12.7,10 13.38,10.12 14,10.34C13.94,9.06 13.18,7.86 11.93,7.3M13.55,3.64C13,3.4 12.45,3.23 11.88,3.12L14.37,1.82L15.27,4.71C14.76,4.29 14.19,3.93 13.55,3.64M6.09,4.44C5.6,4.79 5.17,5.19 4.8,5.63L4.91,2.82L7.87,3.5C7.25,3.71 6.65,4.03 6.09,4.44M18,9.71C17.91,9.12 17.78,8.55 17.59,8L19.97,9.5L17.92,11.73C18.03,11.08 18.05,10.4 18,9.71M3.04,11.3C3.11,11.9 3.24,12.47 3.43,13L1.06,11.5L3.1,9.28C3,9.93 2.97,10.61 3.04,11.3M19,18H16V16A4,4 0 0,0 12,12A4,4 0 0,0 8,16H6A2,2 0 0,0 4,18A2,2 0 0,0 6,20H19A1,1 0 0,0 20,19A1,1 0 0,0 19,18Z',
- 'cloudy': 'M6,19A5,5 0 0,1 1,14A5,5 0 0,1 6,9C7,6.65 9.3,5 12,5C15.43,5 18.24,7.66 18.5,11.03L19,11A4,4 0 0,1 23,15A4,4 0 0,1 19,19H6M19,13H17V12A5,5 0 0,0 12,7C9.5,7 7.45,8.82 7.06,11.19C6.73,11.07 6.37,11 6,11A3,3 0 0,0 3,14A3,3 0 0,0 6,17H19A2,2 0 0,0 21,15A2,2 0 0,0 19,13Z',
- 'fog': 'M3,15H13A1,1 0 0,1 14,16A1,1 0 0,1 13,17H3A1,1 0 0,1 2,16A1,1 0 0,1 3,15M16,15H21A1,1 0 0,1 22,16A1,1 0 0,1 21,17H16A1,1 0 0,1 15,16A1,1 0 0,1 16,15M1,12A5,5 0 0,1 6,7C7,4.65 9.3,3 12,3C15.43,3 18.24,5.66 18.5,9.03L19,9C21.19,9 22.97,10.76 23,13H21A2,2 0 0,0 19,11H17V10A5,5 0 0,0 12,5C9.5,5 7.45,6.82 7.06,9.19C6.73,9.07 6.37,9 6,9A3,3 0 0,0 3,12C3,12.35 3.06,12.69 3.17,13H1.1L1,12M3,19H5A1,1 0 0,1 6,20A1,1 0 0,1 5,21H3A1,1 0 0,1 2,20A1,1 0 0,1 3,19M8,19H21A1,1 0 0,1 22,20A1,1 0 0,1 21,21H8A1,1 0 0,1 7,20A1,1 0 0,1 8,19Z',
- 'rainy': 'M6,14.03A1,1 0 0,1 7,15.03C7,15.58 6.55,16.03 6,16.03C3.24,16.03 1,13.79 1,11.03C1,8.27 3.24,6.03 6,6.03C7,3.68 9.3,2.03 12,2.03C15.43,2.03 18.24,4.69 18.5,8.06L19,8.03A4,4 0 0,1 23,12.03C23,14.23 21.21,16.03 19,16.03H18C17.45,16.03 17,15.58 17,15.03C17,14.47 17.45,14.03 18,14.03H19A2,2 0 0,0 21,12.03A2,2 0 0,0 19,10.03H17V9.03C17,6.27 14.76,4.03 12,4.03C9.5,4.03 7.45,5.84 7.06,8.21C6.73,8.09 6.37,8.03 6,8.03A3,3 0 0,0 3,11.03A3,3 0 0,0 6,14.03M12,14.15C12.18,14.39 12.37,14.66 12.56,14.94C13,15.56 14,17.03 14,18C14,19.11 13.1,20 12,20A2,2 0 0,1 10,18C10,17.03 11,15.56 11.44,14.94C11.63,14.66 11.82,14.4 12,14.15M12,11.03L11.5,11.59C11.5,11.59 10.65,12.55 9.79,13.81C8.93,15.06 8,16.56 8,18A4,4 0 0,0 12,22A4,4 0 0,0 16,18C16,16.56 15.07,15.06 14.21,13.81C13.35,12.55 12.5,11.59 12.5,11.59',
- 'pouring': 'M9,12C9.53,12.14 9.85,12.69 9.71,13.22L8.41,18.05C8.27,18.59 7.72,18.9 7.19,18.76C6.65,18.62 6.34,18.07 6.5,17.54L7.78,12.71C7.92,12.17 8.47,11.86 9,12M13,12C13.53,12.14 13.85,12.69 13.71,13.22L11.64,20.95C11.5,21.5 10.95,21.8 10.41,21.66C9.88,21.5 9.56,20.97 9.7,20.43L11.78,12.71C11.92,12.17 12.47,11.86 13,12M17,12C17.53,12.14 17.85,12.69 17.71,13.22L16.41,18.05C16.27,18.59 15.72,18.9 15.19,18.76C14.65,18.62 14.34,18.07 14.5,17.54L15.78,12.71C15.92,12.17 16.47,11.86 17,12M17,10V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11C3,12.11 3.6,13.08 4.5,13.6V13.59C5,13.87 5.14,14.5 4.87,14.96C4.59,15.43 4,15.6 3.5,15.32V15.33C2,14.47 1,12.85 1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12C23,13.5 22.2,14.77 21,15.46V15.46C20.5,15.73 19.91,15.57 19.63,15.09C19.36,14.61 19.5,14 20,13.72V13.73C20.6,13.39 21,12.74 21,12A2,2 0 0,0 19,10H17Z',
- 'snowy': 'M6,14A1,1 0 0,1 7,15A1,1 0 0,1 6,16A5,5 0 0,1 1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12A4,4 0 0,1 19,16H18A1,1 0 0,1 17,15A1,1 0 0,1 18,14H19A2,2 0 0,0 21,12A2,2 0 0,0 19,10H17V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11A3,3 0 0,0 6,14M7.88,18.07L10.07,17.5L8.46,15.88C8.07,15.5 8.07,14.86 8.46,14.46C8.85,14.07 9.5,14.07 9.88,14.46L11.5,16.07L12.07,13.88C12.21,13.34 12.76,13.03 13.29,13.17C13.83,13.31 14.14,13.86 14,14.4L13.41,16.59L15.6,16C16.14,15.86 16.69,16.17 16.83,16.71C16.97,17.24 16.66,17.79 16.12,17.93L13.93,18.5L15.54,20.12C15.93,20.5 15.93,21.15 15.54,21.54C15.15,21.93 14.5,21.93 14.12,21.54L12.5,19.93L11.93,22.12C11.79,22.66 11.24,22.97 10.71,22.83C10.17,22.69 9.86,22.14 10,21.6L10.59,19.41L8.4,20C7.86,20.14 7.31,19.83 7.17,19.29C7.03,18.76 7.34,18.21 7.88,18.07Z',
- 'snowy-rainy': 'M18.5,18.67C18.5,19.96 17.5,21 16.25,21C15,21 14,19.96 14,18.67C14,17.12 16.25,14.5 16.25,14.5C16.25,14.5 18.5,17.12 18.5,18.67M4,17.36C3.86,16.82 4.18,16.25 4.73,16.11L7,15.5L5.33,13.86C4.93,13.46 4.93,12.81 5.33,12.4C5.73,12 6.4,12 6.79,12.4L8.45,14.05L9.04,11.8C9.18,11.24 9.75,10.92 10.29,11.07C10.85,11.21 11.17,11.78 11,12.33L10.42,14.58L12.67,14C13.22,13.83 13.79,14.15 13.93,14.71C14.08,15.25 13.76,15.82 13.2,15.96L10.95,16.55L12.6,18.21C13,18.6 13,19.27 12.6,19.67C12.2,20.07 11.54,20.07 11.15,19.67L9.5,18L8.89,20.27C8.75,20.83 8.18,21.14 7.64,21C7.08,20.86 6.77,20.29 6.91,19.74L7.5,17.5L5.26,18.09C4.71,18.23 4.14,17.92 4,17.36M1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12A4,4 0 0,1 19,16A1,1 0 0,1 18,15A1,1 0 0,1 19,14A2,2 0 0,0 21,12A2,2 0 0,0 19,10H17V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11C3,11.85 3.35,12.61 3.91,13.16C4.27,13.55 4.26,14.16 3.88,14.54C3.5,14.93 2.85,14.93 2.47,14.54C1.56,13.63 1,12.38 1,11Z',
- 'hail': 'M6,14A1,1 0 0,1 7,15A1,1 0 0,1 6,16A5,5 0 0,1 1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12A4,4 0 0,1 19,16H18A1,1 0 0,1 17,15A1,1 0 0,1 18,14H19A2,2 0 0,0 21,12A2,2 0 0,0 19,10H17V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11A3,3 0 0,0 6,14M10,18A2,2 0 0,1 12,20A2,2 0 0,1 10,22A2,2 0 0,1 8,20A2,2 0 0,1 10,18M14.5,16A1.5,1.5 0 0,1 16,17.5A1.5,1.5 0 0,1 14.5,19A1.5,1.5 0 0,1 13,17.5A1.5,1.5 0 0,1 14.5,16M10.5,12A1.5,1.5 0 0,1 12,13.5A1.5,1.5 0 0,1 10.5,15A1.5,1.5 0 0,1 9,13.5A1.5,1.5 0 0,1 10.5,12Z',
- 'lightning': 'M6,16A5,5 0 0,1 1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12A4,4 0 0,1 19,16H18A1,1 0 0,1 17,15A1,1 0 0,1 18,14H19A2,2 0 0,0 21,12A2,2 0 0,0 19,10H17V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11A3,3 0 0,0 6,14H7A1,1 0 0,1 8,15A1,1 0 0,1 7,16H6M12,11H15L13,15H15L11.25,22L12,17H9.5L12,11Z',
- 'lightning-rainy': 'M4.5,13.59C5,13.87 5.14,14.5 4.87,14.96C4.59,15.44 4,15.6 3.5,15.33V15.33C2,14.47 1,12.85 1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12A4,4 0 0,1 19,16A1,1 0 0,1 18,15A1,1 0 0,1 19,14A2,2 0 0,0 21,12A2,2 0 0,0 19,10H17V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11C3,12.11 3.6,13.08 4.5,13.6V13.59M9.5,11H12.5L10.5,15H12.5L8.75,22L9.5,17H7L9.5,11M17.5,18.67C17.5,19.96 16.5,21 15.25,21C14,21 13,19.96 13,18.67C13,17.12 15.25,14.5 15.25,14.5C15.25,14.5 17.5,17.12 17.5,18.67Z',
- 'windy': 'M4,10A1,1 0 0,1 3,9A1,1 0 0,1 4,8H12A2,2 0 0,0 14,6A2,2 0 0,0 12,4C11.45,4 10.95,4.22 10.59,4.59C10.2,5 9.56,5 9.17,4.59C8.78,4.2 8.78,3.56 9.17,3.17C9.9,2.45 10.9,2 12,2A4,4 0 0,1 16,6A4,4 0 0,1 12,10H4M19,12A1,1 0 0,0 20,11A1,1 0 0,0 19,10C18.72,10 18.47,10.11 18.29,10.29C17.9,10.68 17.27,10.68 16.88,10.29C16.5,9.9 16.5,9.27 16.88,8.88C17.42,8.34 18.17,8 19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14H5A1,1 0 0,1 4,13A1,1 0 0,1 5,12H19M18,18H4A1,1 0 0,1 3,17A1,1 0 0,1 4,16H18A3,3 0 0,1 21,19A3,3 0 0,1 18,22C17.17,22 16.42,21.66 15.88,21.12C15.5,20.73 15.5,20.1 15.88,19.71C16.27,19.32 16.9,19.32 17.29,19.71C17.47,19.89 17.72,20 18,20A1,1 0 0,0 19,19A1,1 0 0,0 18,18Z',
- 'windy-variant': 'M6,6L6.69,6.06C7.32,3.72 9.46,2 12,2A5.5,5.5 0 0,1 17.5,7.5L17.42,8.45C17.88,8.16 18.42,8 19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14H6A4,4 0 0,1 2,10A4,4 0 0,1 6,6M6,8A2,2 0 0,0 4,10A2,2 0 0,0 6,12H19A1,1 0 0,0 20,11A1,1 0 0,0 19,10H15.5V7.5A3.5,3.5 0 0,0 12,4A3.5,3.5 0 0,0 8.5,7.5V8H6M18,18H4A1,1 0 0,1 3,17A1,1 0 0,1 4,16H18A3,3 0 0,1 21,19A3,3 0 0,1 18,22C17.17,22 16.42,21.66 15.88,21.12C15.5,20.73 15.5,20.1 15.88,19.71C16.27,19.32 16.9,19.32 17.29,19.71C17.47,19.89 17.72,20 18,20A1,1 0 0,0 19,19A1,1 0 0,0 18,18Z',
- 'exceptional': 'M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z',
- } %}
- :host {
- {% for name, d in icons.items() %}
- --weather-icon-{{ name }}: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23{{ ic }}' d='{{ d }}'/></svg>");
- {% endfor %}
- }
- /* CALENDAR WEATHER ICON: top-left of each day */
- .weather { position: absolute; left: 7px; top: 8px; }
- .weather .icon { width: 17px !important; height: 17px
- !important; background-size: contain !important;
- background-repeat: no-repeat !important; background-position: center !important; }
- /* EVENTS: [icon] [time] [title…] in a box tinted with the
- calendar colour, solid colour bar on the left */
- .event {
- background: color-mix(in srgb, var(--border-color) var(--c-pillmix), var(--c-pill)) !important;
- border: none !important;
- border-left: 3px solid var(--border-color) !important;
- border-radius: 3px !important;
- box-shadow: inset 0 0 0 1px {{ 'rgba(255,255,255,0.06)' if night else 'rgba(0,0,0,0.04)' }};
- padding: 2px 6px 2px 3px !important;
- margin: 0 0 3px !important;
- display: flex !important;
- align-items: baseline;
- color: var(--c-text);
- }
- .event::after { content: none !important; }
- .event.past { opacity: 0.45; }
- .event .time, .event .additionalColor { display: none
- !important; }
- .event .inner { padding: 0 !important; min-width: 0; }
- /* EVENT ICON: white at night, calendar colour by day */
- .event .icon {
- display: flex !important;
- order: -2;
- flex: none;
- align-self: flex-start;
- align-items: center;
- justify-content: center;
- width: 16px; height: 16px;
- background: none !important;
- color: {{ '#ffffff' if night else 'var(--border-color)' }};
- margin: 1px 5px 0 1px !important;
- padding: 0 !important;
- --mdc-icon-size: 15px;
- }
- .event .icon ha-icon { --mdc-icon-size: 15px; width: 15px;
- height: 15px; display: flex; color: inherit; }
- /* EVENT NAMES: Inter, like the sidebar agenda; wrap to 2 lines
- then "…" (change the clamp for more lines) */
- .event .title {
- font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
- font-size: 0.9rem; font-weight: 600; line-height: 1.3;
- color: color-mix(in srgb, var(--border-color) var(--c-pilltxtmix), var(--c-pilltxt)) !important;
- white-space: normal; overflow-wrap: anywhere;
- display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
- }
- /* EMPTY DAYS: no "No events" box, just blank */
- .day .none, .day .no-events, .day .noEvents { display: none
- !important; }
- .more { background: transparent !important; font-size: 0.8rem;
- color: var(--c-time) !important; padding: 0 4px !important; }
- /* START TIMES: compact "7p" / "7:30a" before timed events,
- except on the days the
- sidebar agenda already shows (today + next 2) and on past days.
- Set agenda_days to 0 to show times on every day. */
- {% set agenda_days = 3 %}
- .event::before {
- order: -1; flex: none; margin-right: 4px;
- font-family: 'Barlow Condensed', 'Roboto Condensed', 'Arial Narrow', sans-serif;
- font-stretch: condensed;
- font-size: 0.8rem; font-weight: 600; line-height: 1.45;
- color: var(--c-sub); white-space: nowrap;
- }
- {% for h in range(24) %}{% set hr = (h % 12) or 12 %}{% set ap =
- 'a' if h < 12 else 'p' %}
- .event[data-start-hour="{{ h }}"]::before { content: "{{ hr }}{{
- ap }}"; }
- .event[data-start-hour="{{ h
- }}"]:not([data-start-minute="00"]):not([data-start-minute="0"])::before
- { content: "{{ hr }}:" attr(data-start-minute) "{{ ap }}"; }
- {% endfor %}
- .event.fullday::before { content: none !important; }
- .day.past .event::before { content: none !important; }
- {% for i in range(agenda_days) %}{% set d = now() +
- timedelta(days=i) %}
- .day[data-date="{{ d.day }}"][data-month="{{ d.month }}"]
- .event::before { content: none !important; }
- {% endfor %}
Advertisement
Add Comment
Please, Sign In to add comment