@ -0,0 +1,153 @@
|
||||
######################################################################
|
||||
# @CCOSTAN - Follow Me on X
|
||||
# For more info visit https://www.vcloudinfo.com/click-here
|
||||
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
||||
# -------------------------------------------------------------------
|
||||
# Living Room TV - Native Roku Raven dashboard
|
||||
# Related Issue: 2030
|
||||
# Launch after two minutes on Roku Home while the TV and Raven are on.
|
||||
# -------------------------------------------------------------------
|
||||
# Notes: Never switches Samsung inputs or sends Samsung Exit.
|
||||
# Notes: Manual exit pauses automatic launch for 15 minutes, across restarts.
|
||||
# Notes: The restoring timer carries shared exit history that Roku lacks.
|
||||
# Notes: The bridge verifies Home, TV power, Raven and cooldown again.
|
||||
# Notes: Keep bridge URLs and the separate control header in secrets.yaml.
|
||||
# Notes: Preserve the existing manual action and automation IDs for callers.
|
||||
# Notes: Screensaver telemetry remains for the existing device panel only.
|
||||
# Notes: Recover only this Roku integration after bridge-detected reconnects.
|
||||
# Notes: Raven restores its state and is re-enabled daily at 03:00.
|
||||
# Notes: TV-off is normal and remains outside always-on kiosk health alerts.
|
||||
######################################################################
|
||||
|
||||
input_boolean:
|
||||
haven:
|
||||
name: Automatic Raven
|
||||
icon: mdi:television-play
|
||||
|
||||
timer:
|
||||
roku_haven_manual_exit:
|
||||
name: Roku Raven manual exit pause
|
||||
duration: '00:15:00'
|
||||
restore: true
|
||||
icon: mdi:pause-circle-outline
|
||||
|
||||
rest_command:
|
||||
samsung_living_room_launch_haven:
|
||||
url: !secret roku_haven_manual_launch_url
|
||||
method: post
|
||||
headers: !secret roku_haven_control_headers
|
||||
timeout: 15
|
||||
roku_haven_launch_when_idle:
|
||||
url: !secret roku_haven_idle_launch_url
|
||||
method: post
|
||||
headers: !secret roku_haven_control_headers
|
||||
timeout: 15
|
||||
|
||||
rest:
|
||||
- resource: !secret roku_haven_status_url
|
||||
headers: !secret roku_haven_control_headers
|
||||
scan_interval: 5
|
||||
timeout: 4
|
||||
binary_sensor:
|
||||
- name: Living Room Roku Screensaver
|
||||
unique_id: living_room_roku_screensaver
|
||||
icon: mdi:monitor-shimmer
|
||||
value_template: '{{ value_json.screensaver | default(false) }}'
|
||||
- name: Living Room Roku Reconnect Required
|
||||
unique_id: living_room_roku_reconnect_required
|
||||
device_class: problem
|
||||
value_template: '{{ value_json.reconnectRequired | default(false) }}'
|
||||
|
||||
automation:
|
||||
- id: samsung_living_room_haven_on_roku_screensaver
|
||||
alias: Living Room TV - Raven after Roku Home Idle
|
||||
description: Launch native Raven after two minutes on Home, respecting TV power and the restoring manual-exit pause.
|
||||
mode: single
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.living_room_ultra_active_app_id
|
||||
to: '562859'
|
||||
for:
|
||||
minutes: 2
|
||||
- trigger: state
|
||||
entity_id: media_player.samsung_q70_series_65
|
||||
to: 'on'
|
||||
for:
|
||||
minutes: 2
|
||||
- trigger: state
|
||||
entity_id: input_boolean.haven
|
||||
to: 'on'
|
||||
- trigger: event
|
||||
event_type: timer.finished
|
||||
event_data:
|
||||
entity_id: timer.roku_haven_manual_exit
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.haven
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: media_player.samsung_q70_series_65
|
||||
state: 'on'
|
||||
for:
|
||||
minutes: 2
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_ultra_active_app_id
|
||||
state: '562859'
|
||||
for:
|
||||
minutes: 2
|
||||
- condition: state
|
||||
entity_id: timer.roku_haven_manual_exit
|
||||
state: idle
|
||||
actions:
|
||||
- action: rest_command.roku_haven_launch_when_idle
|
||||
|
||||
- id: samsung_living_room_exit_haven_on_roku_wake
|
||||
alias: Living Room TV - Pause Raven after Manual Exit
|
||||
description: Preserve time to choose another app after exiting Raven, including Roku's intermediate native menu state.
|
||||
mode: restart
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.living_room_ultra_active_app_id
|
||||
from: dev
|
||||
conditions:
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_ultra_active_app_id
|
||||
state:
|
||||
- unavailable
|
||||
- unknown
|
||||
actions:
|
||||
- action: timer.start
|
||||
target:
|
||||
entity_id: timer.roku_haven_manual_exit
|
||||
|
||||
- id: living_room_roku_reconnect_recovery
|
||||
alias: Living Room Roku - Recover Integration after Reconnect
|
||||
description: Refresh only the living-room Roku config entry after a detected reboot or network recovery; fresh bridge sockets remain independent.
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: binary_sensor.living_room_roku_reconnect_required
|
||||
to: 'on'
|
||||
for:
|
||||
seconds: 10
|
||||
actions:
|
||||
- action: homeassistant.reload_config_entry
|
||||
data:
|
||||
entry_id: "{{ config_entry_id('media_player.living_room_ultra') }}"
|
||||
- delay:
|
||||
minutes: 2
|
||||
|
||||
- id: samsung_living_room_haven_daily_reset
|
||||
alias: Living Room TV - Re-enable Raven at 3 AM
|
||||
description: Restore automatic Raven behavior each night without powering on the TV or launching an app.
|
||||
mode: single
|
||||
triggers:
|
||||
- trigger: time
|
||||
at: '03:00:00'
|
||||
actions:
|
||||
- action: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.haven
|
||||
@ -0,0 +1,140 @@
|
||||
/* Haven read-only, filtered Home Assistant state client.
|
||||
* Credentials are supplied by the caller and never persisted or logged here.
|
||||
* Uses the native compressed entity subscription; ES5 syntax for older displays.
|
||||
*/
|
||||
(function (root) {
|
||||
'use strict';
|
||||
function Client(options) {
|
||||
var self = this, socket = null, authenticated = false, stopped = true;
|
||||
var sequence = 0, subscription = 0, requested = [], states = {}, pending = {}, listeners = {}, streams = [];
|
||||
var retry = null, ping = null, notify = null, reconnectDelay = 1000, forceToken = false;
|
||||
function status(connected, message) { if (options.onStatus) options.onStatus(connected, message || ''); }
|
||||
function emit() {
|
||||
if (notify) return;
|
||||
notify = setTimeout(function () { notify = null; if (options.onStates) options.onStates(states); }, 150);
|
||||
}
|
||||
function unique(values) {
|
||||
return values.filter(function (value, index) { return values.indexOf(value) === index; }).sort();
|
||||
}
|
||||
function send(message) {
|
||||
if (!socket || socket.readyState !== 1) return 0;
|
||||
message.id = ++sequence;
|
||||
socket.send(JSON.stringify(message));
|
||||
return message.id;
|
||||
}
|
||||
function subscribe() {
|
||||
if (!authenticated) return;
|
||||
if (subscription) send({type: 'unsubscribe_events', subscription: subscription});
|
||||
subscription = send({type: 'subscribe_entities', entity_ids: requested});
|
||||
}
|
||||
function subscribeStream(stream) {
|
||||
var message = {type: stream.type};
|
||||
for (var key in stream.data) message[key] = stream.data[key];
|
||||
var id = send(message); listeners[id] = stream.callback;
|
||||
}
|
||||
function apply(update) {
|
||||
var id, raw, existing, patch, add, remove, key, extras = [];
|
||||
for (id in update.a || {}) {
|
||||
raw = update.a[id];
|
||||
states[id] = {entity_id: id, state: raw.s, attributes: raw.a || {},
|
||||
last_changed: new Date(raw.lc * 1000).toISOString(),
|
||||
last_updated: new Date((raw.lu || raw.lc) * 1000).toISOString()};
|
||||
}
|
||||
for (id in update.c || {}) {
|
||||
existing = states[id];
|
||||
if (!existing) continue;
|
||||
patch = update.c[id]; add = patch['+'] || {}; remove = patch['-'] || {};
|
||||
if (add.s !== undefined) existing.state = add.s;
|
||||
for (key in add.a || {}) existing.attributes[key] = add.a[key];
|
||||
(remove.a || []).forEach(function (name) { delete existing.attributes[name]; });
|
||||
if (add.lc) existing.last_changed = new Date(add.lc * 1000).toISOString();
|
||||
if (add.lu || add.lc) existing.last_updated = new Date((add.lu || add.lc) * 1000).toISOString();
|
||||
}
|
||||
(update.r || []).forEach(function (name) { delete states[name]; });
|
||||
requested.forEach(function (name) {
|
||||
var members = states[name] && states[name].attributes.entity_id;
|
||||
if (Array.isArray(members)) extras = extras.concat(members);
|
||||
});
|
||||
if (extras.some(function (name) { return requested.indexOf(name) < 0; })) {
|
||||
requested = unique(requested.concat(extras));
|
||||
subscribe();
|
||||
}
|
||||
emit();
|
||||
}
|
||||
function reconnect() {
|
||||
if (stopped || retry) return;
|
||||
retry = setTimeout(function () { retry = null; connect(); }, reconnectDelay);
|
||||
reconnectDelay = Math.min(30000, reconnectDelay * 2);
|
||||
}
|
||||
function connect() {
|
||||
if (stopped) return;
|
||||
// Never reuse privacy switches from a previous connection.
|
||||
states={};if(options.onStates)options.onStates(states);
|
||||
options.getToken(function (token) {
|
||||
if (stopped) return;
|
||||
try { socket = new WebSocket(options.url.replace(/^http/, 'ws').replace(/\/+$/, '') + '/api/websocket'); }
|
||||
catch (error) { status(false, 'Home Assistant connection unavailable'); reconnect(); return; }
|
||||
socket.onmessage = function (event) {
|
||||
var message;
|
||||
try { message = JSON.parse(event.data); } catch (error) { return; }
|
||||
if (message.type === 'auth_required') socket.send(JSON.stringify({type: 'auth', access_token: token}));
|
||||
else if (message.type === 'auth_ok') {
|
||||
authenticated = true; reconnectDelay = 1000; forceToken = false;
|
||||
status(true); subscribe();
|
||||
listeners = {}; streams.forEach(subscribeStream);
|
||||
clearInterval(ping);
|
||||
ping = setInterval(function () { send({type: 'ping'}); }, 30000);
|
||||
} else if (message.type === 'auth_invalid') {
|
||||
forceToken = true; status(false, 'Home Assistant session needs renewal'); socket.close();
|
||||
} else if (message.type === 'event' && message.id === subscription) apply(message.event);
|
||||
else if (message.type === 'event' && listeners[message.id]) listeners[message.id](message.event);
|
||||
else if (message.type === 'result' && pending[message.id]) {
|
||||
var request = pending[message.id];
|
||||
delete pending[message.id]; clearTimeout(request.timer);
|
||||
request.done(message.success, message.result, message.error);
|
||||
} else if (message.type === 'result' && message.id === subscription && !message.success) {
|
||||
status(false, 'Home Assistant state subscription unavailable');
|
||||
}
|
||||
};
|
||||
socket.onclose = function () {
|
||||
authenticated = false; clearInterval(ping);
|
||||
for (var id in pending) {
|
||||
clearTimeout(pending[id].timer);
|
||||
pending[id].done(false, null, {message: 'Connection closed'});
|
||||
}
|
||||
pending = {};
|
||||
if (!stopped) { status(false, 'Reconnecting to Home Assistant'); reconnect(); }
|
||||
};
|
||||
socket.onerror = function () { status(false, 'Home Assistant connection unavailable'); };
|
||||
}, function () { status(false, 'Home Assistant session unavailable'); reconnect(); }, forceToken);
|
||||
}
|
||||
this.start = function () { if (!stopped) return; stopped = false; connect(); };
|
||||
this.stop = function () {
|
||||
stopped = true; clearTimeout(retry); retry = null; clearInterval(ping);
|
||||
status(false);states={};if(options.onStates)options.onStates(states);
|
||||
if (socket) socket.close();
|
||||
};
|
||||
this.setEntities = function (entities) {
|
||||
var next = unique(entities.concat(requested));
|
||||
if (next.join('|') === requested.join('|')) return;
|
||||
requested = next; subscribe();
|
||||
};
|
||||
this.call = function (type, data, done) {
|
||||
if (!authenticated) { done(false, null, {message: 'Home Assistant is not connected'}); return; }
|
||||
var message = {type: type};
|
||||
for (var key in data || {}) message[key] = data[key];
|
||||
var id = send(message);
|
||||
pending[id] = {done: done, timer: setTimeout(function () {
|
||||
if (!pending[id]) return;
|
||||
delete pending[id]; done(false, null, {message: 'Home Assistant request timed out'});
|
||||
}, 15000)};
|
||||
};
|
||||
this.getStates = function () { return states; };
|
||||
this.subscribe = function (type, data, callback) {
|
||||
var stream = {type:type,data:data,callback:callback}; streams.push(stream);
|
||||
if (authenticated) subscribeStream(stream);
|
||||
};
|
||||
this.setEntities(options.entities || []);
|
||||
}
|
||||
root.HavenKioskClient = Client;
|
||||
}(window));
|
||||
@ -0,0 +1,91 @@
|
||||
/* Passive television layout. Fixed 1080p geometry; Chromium 69 compatible. */
|
||||
#kiosk {position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box;padding:24px;display:grid;grid-template-rows:100px 708px 192px;grid-gap:16px;color:#eff4f5;background:#0b121a;font-family:"SamsungOne","Segoe UI",Arial,sans-serif;}
|
||||
#kiosk * {box-sizing:border-box;}
|
||||
#kiosk [hidden] {display:none!important;}
|
||||
#kiosk-status {display:grid;grid-template-columns:1fr 1fr 1fr 1.23fr 1.23fr;min-height:0;background:#15202b;border:1px solid #2a3741;border-radius:16px;overflow:hidden;}
|
||||
.kiosk-status-card {display:flex;align-items:center;padding:12px 22px;border-right:1px solid #30404a;min-width:0;}
|
||||
.kiosk-status-card:last-child {border:0;}
|
||||
.status-icon {width:35px;height:35px;margin-right:17px;flex-shrink:0;color:#81c9a6;}
|
||||
.status-icon svg {width:100%;height:100%;}
|
||||
.status-copy {min-width:0;}
|
||||
.status-name {font-size:23px;color:#a9b8c2;line-height:1.25;}
|
||||
.status-value {font-size:28px;font-weight:600;line-height:1.3;white-space:nowrap;}
|
||||
.kiosk-status-card.active {background:#172c3b;box-shadow:inset 0 -3px #73bde5;}
|
||||
.kiosk-status-card.active .status-icon,.kiosk-status-card.active .status-value {color:#9bd7f7;}
|
||||
.kiosk-status-card.alert {background:#3a2028;box-shadow:inset 0 -3px #ee8088;}
|
||||
.kiosk-status-card.alert .status-icon,.kiosk-status-card.alert .status-value {color:#ffb3b8;}
|
||||
.kiosk-status-card.warning .status-icon,.kiosk-status-card.warning .status-value {color:#e9c77c;}
|
||||
#kiosk-cameras {display:grid;grid-template-columns:1240px 616px;grid-column-gap:16px;min-height:0;}
|
||||
#kiosk-visual {position:relative;min-height:0;}
|
||||
#kiosk-wall {height:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));grid-gap:12px;}
|
||||
.kiosk-camera {position:relative;min-height:0;overflow:hidden;background:#070c11;border:1px solid #34434c;border-radius:12px;}
|
||||
.kiosk-camera img,#kiosk-video {position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:contain;}
|
||||
#kiosk-main {height:100%;}
|
||||
#kiosk-video {z-index:2;background:#000;}
|
||||
#kiosk-info {display:grid;grid-template-rows:178px 514px;grid-row-gap:16px;min-height:0;}
|
||||
.kiosk-family-strip {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:15px 12px;background:#15202b;border:1px solid #2a3741;border-radius:16px;}
|
||||
.kiosk-person {text-align:center;min-width:0;}
|
||||
.person-photo {position:relative;height:79px;width:79px;margin:0 auto 7px;border:3px solid #668f89;border-radius:50%;background:#395c62;}
|
||||
.person-photo img {position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;object-fit:cover;}
|
||||
.kiosk-person.away .person-photo img,.kiosk-person.unknown .person-photo img {filter:grayscale(100%);opacity:.5;}
|
||||
.kiosk-person.away .person-photo,.kiosk-person.unknown .person-photo {border-color:#687884;background:#293540;}
|
||||
.person-initial {display:block;font-size:34px;line-height:73px;color:#b9d5d0;}
|
||||
.person-photo:after {content:"";position:absolute;bottom:-1px;right:-1px;width:17px;height:17px;border:3px solid #15202b;border-radius:50%;background:#81c9a6;}
|
||||
.kiosk-person.away .person-photo:after {background:#88b7eb;}
|
||||
.kiosk-person.unknown .person-photo:after {background:#e9c77c;}
|
||||
.person-name {font-size:24px;font-weight:600;line-height:1.25;}
|
||||
.person-state {font-size:20px;color:#a9b8c2;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
|
||||
.kiosk-details {position:relative;overflow:hidden;background:#15202b;border:1px solid #2a3741;border-radius:16px;padding:24px 26px;}
|
||||
.info-page {height:100%;}
|
||||
.family-weather {display:flex;flex-direction:column;}
|
||||
.weather-now {display:flex;align-items:center;justify-content:space-between;height:145px;flex-shrink:0;}
|
||||
.weather-condition {font-size:20px;letter-spacing:1px;color:#a9b8c2;text-transform:uppercase;}
|
||||
.weather-temperature {font-size:72px;font-weight:500;line-height:1.05;letter-spacing:-3px;}
|
||||
.weather-context {font-size:22px;color:#b8c6cf;margin-top:4px;}
|
||||
.weather-symbol {font-size:82px;color:#e9c77c;margin-right:10px;}
|
||||
.info-heading {font-size:19px;letter-spacing:1px;color:#a9b8c2;display:none;}
|
||||
.forecast-days {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:15px 0 13px;border-top:1px solid #30404a;border-bottom:1px solid #30404a;}
|
||||
.forecast-name {font-size:22px;color:#a9b8c2;margin-bottom:6px;}
|
||||
.forecast-icon {display:inline-block;font-size:29px;color:#e9c77c;vertical-align:middle;margin-right:8px;}
|
||||
.forecast-temperature {display:inline-block;font-size:27px;font-weight:600;vertical-align:middle;}
|
||||
.forecast-temperature span {font-size:22px;color:#94a7b5;margin-left:3px;}
|
||||
.forecast-rain {font-size:18px;color:#94a7b5;margin-top:2px;}
|
||||
.info-away-list {margin-top:13px;overflow:hidden;}
|
||||
.info-away-card {position:relative;padding:4px 0 8px 92px;min-height:72px;}
|
||||
.away-name {position:absolute;left:0;top:6px;font-size:24px;font-weight:600;max-width:85px;}
|
||||
.away-location {font-size:23px;color:#c4d4df;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
|
||||
.away-since {font-size:18px;color:#94a7b5;margin-top:3px;}
|
||||
.energy-heading {display:flex;align-items:center;justify-content:space-between;font-size:27px;font-weight:600;letter-spacing:.2px;}
|
||||
.energy-heading span {font-size:22px;color:#9eafbb;font-weight:400;}
|
||||
.energy-body {height:418px;margin-top:5px;}
|
||||
.energy-diagram {width:100%;height:390px;overflow:visible;}
|
||||
.energy-value {font-size:38px;font-weight:600;fill:#eff4f5;text-anchor:middle;}
|
||||
.energy-unit {font-size:22px;fill:#b0c1cb;text-anchor:middle;}
|
||||
.energy-label {font-size:21px;letter-spacing:1px;fill:#b0c1cb;text-anchor:middle;}
|
||||
.energy-caption {font-size:20px;color:#a9b8c2;text-align:center;margin-top:2px;}
|
||||
.kiosk-pagination {position:absolute;bottom:13px;left:0;right:0;text-align:center;height:7px;}
|
||||
.kiosk-pagination i {display:inline-block;width:7px;height:7px;margin:0 4px;border-radius:50%;background:#52636f;}
|
||||
.kiosk-pagination i.selected {width:24px;border-radius:4px;background:#9dbbc7;}
|
||||
.agenda-heading {display:flex;align-items:baseline;justify-content:space-between;font-size:30px;font-weight:600;line-height:36px;}
|
||||
.agenda-heading span {font-size:19px;color:#a9b8c2;font-weight:400;}
|
||||
.agenda-list {margin-top:13px;}
|
||||
.agenda-item {height:99px;padding:10px 0 9px 15px;border-top:1px solid #30404a;position:relative;}
|
||||
.agenda-item:before {content:"";position:absolute;left:0;top:15px;bottom:15px;width:3px;border-radius:2px;background:#8fc6ec;}
|
||||
.agenda-item.person-1:before {background:#d5afea;}
|
||||
.agenda-item.shared:before {background:#8cd1b1;}
|
||||
.agenda-meta {display:flex;justify-content:space-between;align-items:center;line-height:24px;font-size:20px;color:#b8c6cf;}
|
||||
.agenda-when b {font-weight:400;color:#708994;margin:0 3px;}
|
||||
.agenda-owner {font-size:17px;font-weight:600;border-radius:6px;padding:0 8px;background:#243b4b;color:#abd9f7;line-height:24px;margin-left:12px;}
|
||||
.person-1 .agenda-owner {background:#382d46;color:#e1c1f2;}
|
||||
.shared .agenda-owner {background:#233d38;color:#a4ddc2;}
|
||||
.agenda-title {font-size:28px;font-weight:500;line-height:30px;margin-top:5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:break-word;}
|
||||
#kiosk-notice {position:relative;overflow:hidden;border:1px solid #344a58;border-left:5px solid var(--notice-accent,#88bdce);border-radius:16px;background:#172735;padding:14px 30px;}
|
||||
#kiosk-kicker {font-size:20px;color:#9fb8c7;letter-spacing:1.8px;font-weight:600;line-height:1.1;}
|
||||
#kiosk-notice-title {font-size:49px;font-weight:600;line-height:1.1;margin:7px 0 6px;letter-spacing:-.5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
|
||||
#kiosk-notice-detail {font-size:31px;color:#c4d4df;line-height:1.15;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
|
||||
#kiosk-notice.long-title #kiosk-notice-title {font-size:39px;}
|
||||
#kiosk-notice.long-title #kiosk-notice-detail {font-size:25px;-webkit-line-clamp:1;}
|
||||
#kiosk-connection {position:absolute;top:0;left:0;right:0;z-index:20;padding:8px 20px;text-align:center;background:#793c11;color:#fff;font-size:23px;}
|
||||
#kiosk.avplay-on,#kiosk.avplay-on #kiosk-visual,#kiosk.avplay-on #kiosk-main {background:transparent;}
|
||||
#kiosk.avplay-on #kiosk-main img {visibility:hidden;}
|
||||
#kiosk-avplayer {position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:1;}
|
||||
@ -0,0 +1,39 @@
|
||||
/* Optional browser-preview settings. Copy to kiosk-config.js and keep it private.
|
||||
* The preview reuses the signed-in Home Assistant browser session; never add a token.
|
||||
* All names and entity IDs below are examples.
|
||||
*/
|
||||
window.HAVEN_KIOSK_PREVIEW = {
|
||||
weatherEntity: 'weather.home',
|
||||
notificationEntity: 'sensor.household_notification',
|
||||
cameras: [
|
||||
{entity: 'camera.entry', name: 'Entry'},
|
||||
{entity: 'camera.lawn', name: 'Lawn'},
|
||||
{entity: 'camera.drive', name: 'Driveway'},
|
||||
{entity: 'camera.garage', name: 'Garage'}
|
||||
],
|
||||
events: {entity: 'sensor.kiosk_camera_view', views: {garage: {entity: 'camera.garage'}}},
|
||||
information: {
|
||||
rotationSeconds: 20,
|
||||
// Optional: source attribute must contain only approved display fields.
|
||||
// agenda: {entity:'sensor.household_status',attribute:'familyAgenda',hideWhenEntities:['input_boolean.guest_mode','input_boolean.vacation_mode']},
|
||||
statusCards: [
|
||||
{entity: 'cover.garage', name: 'Garage', icon: 'garage', normalStates: ['closed'], alertStates: ['open','opening','closing']},
|
||||
{entity: 'lock.entry', name: 'Entry', icon: 'lock', normalStates: ['locked'], alertStates: ['unlocked','unlocking','locking','jammed']},
|
||||
{entity: 'binary_sensor.windows', name: 'Windows', icon: 'window', normalStates: ['off'], alertStates: ['on'], labels: {off:'SECURE',on:'OPEN'}},
|
||||
{entity: 'climate.downstairs', name: 'Downstairs', icon: 'climate', mode: 'climate'},
|
||||
{entity: 'climate.upstairs', name: 'Upstairs', icon: 'climate', mode: 'climate'}
|
||||
],
|
||||
people: [
|
||||
{entity: 'person.alex', name: 'Alex'},
|
||||
{entity: 'person.jamie', name: 'Jamie'},
|
||||
{entity: 'person.sam', name: 'Sam', homeStates: ['home','University Residence'], locationEntity: 'sensor.sam_location', showLocation: true},
|
||||
{entity: 'person.riley', name: 'Riley', homeStates: ['home','City Apartment'], locationEntity: 'sensor.riley_location', showLocation: true}
|
||||
],
|
||||
energy: {
|
||||
solar: 'sensor.solar_energy_total',
|
||||
gridImport: 'sensor.grid_import_total', gridExport: 'sensor.grid_export_total',
|
||||
batteryCharge: 'sensor.battery_charge_total', batteryDischarge: 'sensor.battery_discharge_total',
|
||||
water: 'sensor.water_usage_daily', waterUnit: 'gal'
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -0,0 +1,35 @@
|
||||
<!doctype html>
|
||||
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Haven TV Kiosk Preview</title><link rel="stylesheet" href="design/style.css?v=1.2.3">
|
||||
<style>html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#000}#stage{position:absolute;top:0;left:0;width:1920px;height:1080px;transform-origin:0 0;overflow:hidden}</style>
|
||||
</head><body><div id="stage"></div>
|
||||
<script src="kiosk-config.js?v=1.2.3"></script><script src="client.js?v=1.2.3"></script>
|
||||
<script>
|
||||
(function () {
|
||||
'use strict';
|
||||
function tokens() { try {return JSON.parse(localStorage.getItem('hassTokens') || 'null');} catch(error) {return null;} }
|
||||
function access(done,failed,force) {
|
||||
var saved=tokens(), expires=saved && new Date(saved.expires).getTime();
|
||||
if (!saved || !saved.access_token) {failed(); return;}
|
||||
if (!force && (!isFinite(expires) || expires-Date.now()>60000)) {done(saved.access_token); return;}
|
||||
var body='grant_type=refresh_token&refresh_token='+encodeURIComponent(saved.refresh_token);
|
||||
var clientId=saved.clientId || saved.client_id;
|
||||
if(clientId) body+='&client_id='+encodeURIComponent(clientId);
|
||||
fetch('/auth/token',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:body}).then(function(response){
|
||||
if(!response.ok) throw new Error('Session renewal failed'); return response.json();
|
||||
}).then(function(result){
|
||||
saved.access_token=result.access_token; saved.expires=new Date(Date.now()+result.expires_in*1000).toISOString();
|
||||
localStorage.setItem('hassTokens',JSON.stringify(saved)); done(saved.access_token);
|
||||
}).catch(failed);
|
||||
}
|
||||
function fit(){var scale=Math.min(innerWidth/1920,innerHeight/1080);document.getElementById('stage').style.transform='translate('+(innerWidth-1920*scale)/2+'px,'+(innerHeight-1080*scale)/2+'px) scale('+scale+')';}
|
||||
window.addEventListener('resize',fit); fit();
|
||||
window.Haven={isTV:false,kiosk:function(){return window.HAVEN_KIOSK_PREVIEW || {};},
|
||||
ha:function(){return {url:location.origin,token:''};}, accessToken:access,ready:function(){},
|
||||
get:function(key,fallback){try{return JSON.parse(localStorage.getItem('haven.preview.'+key)) || fallback;}catch(error){return fallback;}},
|
||||
set:function(key,value){localStorage.setItem('haven.preview.'+key,JSON.stringify(value));},
|
||||
fetchText:function(url,timeout,ok,bad){var request=new XMLHttpRequest();request.open('GET',url,true);request.timeout=timeout;
|
||||
request.onload=function(){if(request.status===200)ok(request.responseText);else bad();};request.onerror=bad;request.ontimeout=bad;request.send();}
|
||||
};
|
||||
}());
|
||||
</script><script src="design/design.js?v=1.2.3"></script></body></html>
|
||||
@ -0,0 +1,484 @@
|
||||
/* Shared household kiosk notification model.
|
||||
* Kitchen, Upstairs, Office, Bedroom and Haven consume this one list.
|
||||
* Add notification types in build(); keep ES5 syntax for older displays.
|
||||
* State and actions are data only; renderers decide presentation and interaction.
|
||||
* Issue #2029: seasonal accents follow the lighting mode, never a second calendar.
|
||||
*/
|
||||
(function (root) {
|
||||
'use strict';
|
||||
function firstIndex(values, predicate) {
|
||||
for (var index = 0; index < values.length; index++) {
|
||||
if (predicate(values[index], index, values)) return index;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
function seasonal(states) {
|
||||
// Palette values follow scene/monthly_colors.yaml and Joanna's approved art.
|
||||
// Return decoration only: never recolor text, warning icons, or camera pixels.
|
||||
var palettes = {
|
||||
halloween: [[255,165,0], [0,128,0], [30,144,255]],
|
||||
thanksgiving: [[255,165,0]],
|
||||
christmas: [[204,0,0], [0,128,0]],
|
||||
hanukkah: [[30,144,255], [255,255,255]],
|
||||
rwb: [[204,0,0], [245,245,245], [30,144,255]],
|
||||
new_years_day: [[255,165,0], [30,144,255], [0,128,0]],
|
||||
valentine: [[220,20,60]],
|
||||
mardi_gras: [[255,223,0], [128,0,128], [0,128,0]],
|
||||
pi: [[3,14,159]],
|
||||
st_patty: [[0,128,0]],
|
||||
easter: [[244,187,255], [255,193,204], [255,255,0]],
|
||||
starwars: [[204,0,0], [245,245,245]],
|
||||
cinco_de_mayo: [[204,0,0], [245,245,245], [0,128,0]],
|
||||
mothers_day: [[244,187,255]],
|
||||
fathers_day: [[255,165,0], [30,144,255]],
|
||||
veterans: [[0,128,0]]
|
||||
};
|
||||
var source = states && states['sensor.holiday_lighting_mode'];
|
||||
var mode = String(source && source.state || '').trim().toLowerCase();
|
||||
var colors = Object.prototype.hasOwnProperty.call(palettes, mode) ? palettes[mode] : null;
|
||||
if (!colors) return {mode: 'standard', label: '', art: '', emblem: '', wash: 'none', edge: 'none', background: 'none', compactBackground: 'none'};
|
||||
var labels = {
|
||||
halloween: 'Halloween', thanksgiving: 'Thanksgiving', christmas: 'Christmas',
|
||||
hanukkah: 'Hanukkah', rwb: 'Stars & Stripes', new_years_day: 'New Year',
|
||||
valentine: "Valentine's Day", mardi_gras: 'Mardi Gras', pi: 'Pi Day',
|
||||
st_patty: "St. Patrick's Day", easter: 'Easter', starwars: 'Star Wars Day',
|
||||
cinco_de_mayo: 'Cinco de Mayo', mothers_day: "Mother's Day",
|
||||
fathers_day: "Father's Day", veterans: 'Veterans Day'
|
||||
};
|
||||
function rgba(color, opacity) { return 'rgba(' + color.join(',') + ',' + opacity + ')'; }
|
||||
var wash = 'linear-gradient(115deg,' + rgba(colors[0], 0.14) + ',' +
|
||||
rgba(colors[Math.min(1, colors.length - 1)], 0.055) + ' 60%,' +
|
||||
rgba(colors[colors.length - 1], 0.10) + ')';
|
||||
var art = '/local/kiosk/seasonal/' + mode + '.svg';
|
||||
return {
|
||||
mode: mode,
|
||||
label: labels[mode], art: art,
|
||||
emblem: '/local/kiosk/seasonal/' + mode + '-emblem.svg',
|
||||
wash: wash,
|
||||
background: 'url("' + art + '") right 14px top 6px / 112px 64px no-repeat,' + wash,
|
||||
compactBackground: 'url("' + art + '") right 8px top 4px / 63px 36px no-repeat,' + wash,
|
||||
edge: 'inset 0 2px 0 ' + rgba(colors[0], 0.75)
|
||||
};
|
||||
}
|
||||
function build(states, now) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
||||
now = now || new Date();
|
||||
var state = function (entityId) { var _a; return (_a = states[entityId]) === null || _a === void 0 ? void 0 : _a.state; };
|
||||
var valid = function (value) { return ['unknown', 'unavailable', 'none', '', undefined].indexOf(value) < 0; };
|
||||
var pretty = function (value) { return String(value || 'Unknown').split('_').join(' '); };
|
||||
var dateKey = function (date) {
|
||||
var year = date.getFullYear();
|
||||
var month = ('0' + (date.getMonth() + 1)).slice(-2);
|
||||
var day = ('0' + date.getDate()).slice(-2);
|
||||
return "".concat(year, "-").concat(month, "-").concat(day);
|
||||
};
|
||||
var items = [];
|
||||
var radarWeatherEvent = states['binary_sensor.kiosk_rain_radar_weather_event'];
|
||||
var radarDisplayTimer = states['timer.kitchen_kiosk_radar_display'];
|
||||
var radarReplayReady = (radarWeatherEvent === null || radarWeatherEvent === void 0 ? void 0 : radarWeatherEvent.state) === 'on' &&
|
||||
state('binary_sensor.kiosk_rain_radar_active') !== 'on' &&
|
||||
(radarDisplayTimer === null || radarDisplayTimer === void 0 ? void 0 : radarDisplayTimer.state) === 'idle' &&
|
||||
new Date(radarDisplayTimer.last_changed).getTime() >
|
||||
new Date(radarWeatherEvent.last_changed).getTime();
|
||||
if (radarReplayReady) {
|
||||
items.push({
|
||||
kicker: 'WEATHER RADAR',
|
||||
title: 'Storms Approaching',
|
||||
detail: 'Tap for radar',
|
||||
icon: 'mdi:radar',
|
||||
accent: '#0288d1',
|
||||
action: {
|
||||
service: 'kitchen_kiosk_show_event',
|
||||
data: { event_type: 'radar' }
|
||||
}
|
||||
});
|
||||
}
|
||||
var phynAlerts = [
|
||||
'binary_sensor.garage_phyn_battery_alert',
|
||||
'binary_sensor.garage_phyn_freeze_warning_alert',
|
||||
'binary_sensor.garage_phyn_high_pressure_alert',
|
||||
'binary_sensor.garage_phyn_leak_alert',
|
||||
'binary_sensor.garage_phyn_offline_leak_shutoff_alert',
|
||||
'binary_sensor.garage_phyn_pinhole_leak_alert',
|
||||
'binary_sensor.garage_phyn_recurring_flow_alert',
|
||||
'binary_sensor.garage_phyn_temperature_alert'
|
||||
].filter(function (entityId) { return state(entityId) === 'on'; });
|
||||
var phynValveState = state('valve.phyn_shutoff_valve');
|
||||
if (phynAlerts.length > 0 || (valid(phynValveState) && phynValveState !== 'open')) {
|
||||
var alertNames = phynAlerts.map(function (entityId) { var _a, _b; return ((_b = (_a = states[entityId]) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b.friendly_name) || pretty(entityId.split('.')[1]); });
|
||||
items.push({
|
||||
kicker: 'WATER SYSTEM',
|
||||
title: phynValveState === 'closed' ? 'Main water is off' : 'Phyn needs attention',
|
||||
detail: "".concat(alertNames.join(' · ') || "Valve is ".concat(pretty(phynValveState)), " \u00B7 Tap for water details"),
|
||||
icon: 'mdi:water-alert-outline',
|
||||
accent: '#c62828',
|
||||
action: {
|
||||
service: 'kitchen_kiosk_show_detail',
|
||||
data: { detail_type: 'phyn' }
|
||||
}
|
||||
});
|
||||
}
|
||||
var weatherAlertEntity = states['sensor.nws_alerts_alerts'];
|
||||
var weatherAlertCount = Number.parseInt(weatherAlertEntity === null || weatherAlertEntity === void 0 ? void 0 : weatherAlertEntity.state, 10);
|
||||
var weatherAlerts = Array.isArray((_a = weatherAlertEntity === null || weatherAlertEntity === void 0 ? void 0 : weatherAlertEntity.attributes) === null || _a === void 0 ? void 0 : _a.Alerts)
|
||||
? weatherAlertEntity.attributes.Alerts
|
||||
: [];
|
||||
var cleanAlertText = function (value) { return String(value || '').replace(/\s+/g, ' ').trim(); };
|
||||
var alertSection = function (description, label) {
|
||||
var _a;
|
||||
var pattern = new RegExp("\\*\\s*".concat(label, "\\.{3}\\s*([\\s\\S]*?)(?=\\n\\s*\\n\\s*\\*\\s*[A-Z ]+\\.{3}|$)"), 'i');
|
||||
return cleanAlertText((_a = String(description || '').match(pattern)) === null || _a === void 0 ? void 0 : _a[1]);
|
||||
};
|
||||
var limitAlertText = function (value, maxLength) {
|
||||
if (maxLength === void 0) { maxLength = 240; }
|
||||
var text = cleanAlertText(value);
|
||||
if (text.length <= maxLength)
|
||||
return text;
|
||||
return "".concat(text.slice(0, maxLength - 3).replace(/\s+\S*$/, ''), "...");
|
||||
};
|
||||
var severityOrder = { Extreme: 0, Severe: 1, Moderate: 2, Minor: 3, Unknown: 4 };
|
||||
var severityColors = {
|
||||
Extreme: '#b71c1c',
|
||||
Severe: '#c62828',
|
||||
Moderate: '#d84315',
|
||||
Minor: '#f9a825',
|
||||
Unknown: '#546e7a'
|
||||
};
|
||||
var uniqueWeatherAlerts = weatherAlerts
|
||||
.filter(function (alert, index, alerts) {
|
||||
var alertKey = alert.ID || alert.URL || "".concat(alert.Event, "|").concat(alert.Expires);
|
||||
return firstIndex(alerts, function (candidate) {
|
||||
return (candidate.ID || candidate.URL || "".concat(candidate.Event, "|").concat(candidate.Expires)) === alertKey;
|
||||
}) === index;
|
||||
})
|
||||
.sort(function (left, right) {
|
||||
var _a, _b;
|
||||
return ((_a = severityOrder[left.Severity]) !== null && _a !== void 0 ? _a : severityOrder.Unknown)
|
||||
- ((_b = severityOrder[right.Severity]) !== null && _b !== void 0 ? _b : severityOrder.Unknown);
|
||||
});
|
||||
if (uniqueWeatherAlerts.length > 0) {
|
||||
uniqueWeatherAlerts.forEach(function (alert, index) {
|
||||
var severity = severityColors[alert.Severity] ? alert.Severity : 'Unknown';
|
||||
var detailParts = [
|
||||
alertSection(alert.Description, 'WHAT'),
|
||||
alertSection(alert.Description, 'WHERE'),
|
||||
alertSection(alert.Description, 'WHEN')
|
||||
].filter(Boolean);
|
||||
var detail = detailParts.length > 0
|
||||
? detailParts.join(' · ')
|
||||
: alert.Headline || alert.Description || 'Active National Weather Service alert';
|
||||
var position = uniqueWeatherAlerts.length > 1
|
||||
? " ".concat(index + 1, "/").concat(uniqueWeatherAlerts.length)
|
||||
: '';
|
||||
items.push({
|
||||
kicker: "WEATHER ALERT".concat(position, " \u00B7 ").concat(severity.toUpperCase()),
|
||||
title: alert.Event || "".concat(weatherAlertCount, " active alerts"),
|
||||
detail: limitAlertText(detail),
|
||||
icon: 'mdi:weather-lightning-rainy',
|
||||
accent: severityColors[severity],
|
||||
action: {
|
||||
service: 'kitchen_kiosk_show_detail',
|
||||
data: {
|
||||
detail_type: 'weather',
|
||||
detail_subject: String(alert.ID || index)
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
else if (Number.isFinite(weatherAlertCount) && weatherAlertCount > 0) {
|
||||
items.push({
|
||||
kicker: 'WEATHER ALERT',
|
||||
title: "".concat(weatherAlertCount, " active ").concat(weatherAlertCount === 1 ? 'alert' : 'alerts'),
|
||||
detail: 'Alert details are temporarily unavailable',
|
||||
icon: 'mdi:weather-lightning-rainy',
|
||||
accent: severityColors.Unknown,
|
||||
action: {
|
||||
service: 'kitchen_kiosk_show_detail',
|
||||
data: { detail_type: 'weather', detail_subject: '0' }
|
||||
}
|
||||
});
|
||||
}
|
||||
if (valid(state('group.garage_doors')) && ['closed', 'off'].indexOf(state('group.garage_doors')) < 0) {
|
||||
var openGarages = ['cover.large_garage_door', 'cover.small_garage_door']
|
||||
.filter(function (entityId) { return valid(state(entityId)) && state(entityId) !== 'closed'; })
|
||||
.map(function (entityId) { var _a, _b; return ((_b = (_a = states[entityId]) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b.friendly_name) || pretty(entityId.split('.')[1]); });
|
||||
items.push({
|
||||
kicker: 'GARAGE',
|
||||
title: 'Garage door open',
|
||||
detail: openGarages.join(' · ') || 'Check both garage doors',
|
||||
icon: 'mdi:garage-open-variant',
|
||||
accent: '#ef6c00'
|
||||
});
|
||||
}
|
||||
if (state('group.entry_points') === 'on') {
|
||||
var openEntries = (((_c = (_b = states['group.entry_points']) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.entity_id) || [])
|
||||
.filter(function (entityId) { return state(entityId) === 'on'; })
|
||||
.map(function (entityId) { var _a, _b; return ((_b = (_a = states[entityId]) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b.friendly_name) || pretty(entityId.split('.')[1]); });
|
||||
var extraCount = Math.max(0, openEntries.length - 3);
|
||||
var entryDetail = openEntries.slice(0, 3).join(' · ') + (extraCount ? " \u00B7 +".concat(extraCount, " more") : '');
|
||||
items.push({
|
||||
kicker: 'ENTRY POINT',
|
||||
title: openEntries.length === 1 ? 'Door or window open' : "".concat(openEntries.length, " openings detected"),
|
||||
detail: entryDetail || 'Check the exterior doors and windows',
|
||||
icon: 'mdi:door-open',
|
||||
accent: '#ef6c00',
|
||||
action: {
|
||||
service: 'kitchen_kiosk_show_detail',
|
||||
data: { detail_type: 'entry_points' }
|
||||
}
|
||||
});
|
||||
}
|
||||
if (valid(state('group.locks')) && state('group.locks') !== 'locked') {
|
||||
items.push({
|
||||
kicker: 'SECURITY',
|
||||
title: 'Check the front door lock',
|
||||
detail: "Lock group is ".concat(pretty(state('group.locks'))),
|
||||
icon: 'mdi:lock-alert-outline',
|
||||
accent: '#c62828'
|
||||
});
|
||||
}
|
||||
if (state('binary_sensor.front_door_packages_present') === 'on') {
|
||||
items.push({
|
||||
kicker: 'FRONT DOOR',
|
||||
title: 'Package waiting',
|
||||
detail: 'Tap for the front door view',
|
||||
icon: 'mdi:package-variant-closed',
|
||||
accent: '#8e5a2b',
|
||||
action: {
|
||||
service: 'kitchen_kiosk_show_detail',
|
||||
data: { detail_type: 'package' }
|
||||
}
|
||||
});
|
||||
}
|
||||
var rheemAlertCount = Number.parseInt(state('sensor.rheem_wh_alert_count'), 10);
|
||||
var rheemStatus = state('sensor.rheem_wh_diagnostic_status');
|
||||
var rheemProblem = state('binary_sensor.rheem_wh_problem') === 'on';
|
||||
if (rheemProblem) {
|
||||
var activeAlert = state('binary_sensor.rheem_wh_active_alert') === 'on';
|
||||
var telemetryStale = state('binary_sensor.rheem_wh_telemetry_stale') === 'on';
|
||||
items.push({
|
||||
kicker: telemetryStale && !activeAlert ? 'WATER HEATER TELEMETRY' : 'WATER HEATER ALERT',
|
||||
title: activeAlert && Number.isFinite(rheemAlertCount)
|
||||
? "".concat(rheemAlertCount, " active ").concat(rheemAlertCount === 1 ? 'alert' : 'alerts')
|
||||
: "Rheem status: ".concat(pretty(rheemStatus)),
|
||||
detail: telemetryStale
|
||||
? 'EcoNet data has been unavailable for 10 minutes · Tap for diagnostics'
|
||||
: 'Home Assistant Repairs has the diagnostic snapshot · Tap for details',
|
||||
icon: 'mdi:water-boiler-alert',
|
||||
accent: telemetryStale && !activeAlert ? '#ef6c00' : '#c62828',
|
||||
action: {
|
||||
service: 'kitchen_kiosk_show_detail',
|
||||
data: { detail_type: 'hot_water' }
|
||||
}
|
||||
});
|
||||
}
|
||||
var hotWater = Number.parseFloat(state('sensor.rheem_wh_available_hot_water'));
|
||||
if (!rheemProblem && Number.isFinite(hotWater) && hotWater < 30) {
|
||||
items.push({
|
||||
kicker: 'HOT WATER',
|
||||
title: 'Hot water is running low',
|
||||
detail: "".concat(Math.round(hotWater), "% available \u00B7 Tap for recovery details"),
|
||||
icon: 'mdi:water-thermometer-outline',
|
||||
accent: '#0277bd',
|
||||
action: {
|
||||
service: 'kitchen_kiosk_show_detail',
|
||||
data: { detail_type: 'hot_water' }
|
||||
}
|
||||
});
|
||||
}
|
||||
var weekday = now.toLocaleDateString('en-US', { weekday: 'short' });
|
||||
if (['Wed', 'Sun'].indexOf(weekday) >= 0 && state('input_boolean.garbage_cans_out') !== 'on') {
|
||||
items.push({
|
||||
kicker: 'TODAY',
|
||||
title: weekday === 'Wed' ? 'Garbage + recycling day' : 'Garbage day',
|
||||
detail: 'Put the cans at the curb',
|
||||
icon: 'mdi:trash-can-outline',
|
||||
accent: '#2e7d32'
|
||||
});
|
||||
}
|
||||
var tomorrow = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1);
|
||||
if (state('input_datetime.water_delivery_date') === dateKey(tomorrow)) {
|
||||
items.push({
|
||||
kicker: 'WATER DELIVERY TOMORROW',
|
||||
title: 'Put the bottles out',
|
||||
detail: 'Stage them before leaving the house',
|
||||
icon: 'mdi:bottle-soda-classic-outline',
|
||||
accent: '#0277bd'
|
||||
});
|
||||
}
|
||||
var battery = Number.parseFloat(state('sensor.spaceship_battery_level'));
|
||||
var lastClose = new Date(String(state('input_datetime.tesla_model_y_last_garage_close')).replace(' ', 'T'));
|
||||
var snoozeUntil = new Date(String(state('input_datetime.tesla_model_y_plug_in_snooze_until')).replace(' ', 'T'));
|
||||
var recentArrival = Number.isFinite(lastClose.getTime()) && (now.getTime() - lastClose.getTime()) < 43200000;
|
||||
var snoozeExpired = !Number.isFinite(snoozeUntil.getTime()) || snoozeUntil <= now;
|
||||
if (Number.isFinite(battery) && battery < 50 && recentArrival && snoozeExpired &&
|
||||
state('switch.spaceship_charge') === 'off' &&
|
||||
state('person.carlo') === 'home' && state('person.stacey') === 'home') {
|
||||
items.push({
|
||||
kicker: 'MODEL Y',
|
||||
title: 'Plug in the Tesla',
|
||||
detail: "".concat(Math.round(battery), "% battery after the latest garage arrival"),
|
||||
icon: 'mdi:ev-plug-tesla',
|
||||
accent: '#c62828'
|
||||
});
|
||||
}
|
||||
if (state('light.sink') === 'unavailable') {
|
||||
items.push({
|
||||
kicker: 'CHECK WALL SWITCH',
|
||||
title: 'Kitchen sink light',
|
||||
detail: 'Please turn its physical switch back on.',
|
||||
icon: 'mdi:lightbulb-alert-outline',
|
||||
accent: '#ef6c00'
|
||||
});
|
||||
}
|
||||
var saltDays = Number.parseFloat(state('sensor.water_softener_salt_days_since_last_add'));
|
||||
var saltAverage = Number.parseFloat(state('sensor.water_softener_salt_average_days_between_refills'));
|
||||
if (Number.isFinite(saltDays) && Number.isFinite(saltAverage) && saltAverage > 0 &&
|
||||
saltDays >= saltAverage * 0.9) {
|
||||
items.push({
|
||||
kicker: 'WATER SOFTENER',
|
||||
title: 'Salt refill coming due',
|
||||
detail: "".concat(Math.round(saltDays), " days since the last refill"),
|
||||
icon: 'mdi:shaker-outline',
|
||||
accent: '#00838f'
|
||||
});
|
||||
}
|
||||
var bowlingHighlights = (_e = (_d = states['sensor.bearclaw_status_telemetry']) === null || _d === void 0 ? void 0 : _d.attributes) === null || _e === void 0 ? void 0 : _e.bowlingHighlights;
|
||||
if ((bowlingHighlights === null || bowlingHighlights === void 0 ? void 0 : bowlingHighlights.active) && Array.isArray(bowlingHighlights.items)) {
|
||||
bowlingHighlights.items.forEach(function (highlight) {
|
||||
var expiresAt = new Date((highlight === null || highlight === void 0 ? void 0 : highlight.expiresAt) || '');
|
||||
var games = (Array.isArray(highlight === null || highlight === void 0 ? void 0 : highlight.games) ? highlight.games : [])
|
||||
.map(function (score) { return Number.parseInt(score, 10); })
|
||||
.filter(Number.isFinite);
|
||||
var highGame = Number.parseInt(highlight === null || highlight === void 0 ? void 0 : highlight.highGame, 10);
|
||||
var seriesTotal = Number.parseInt(highlight === null || highlight === void 0 ? void 0 : highlight.seriesTotal, 10);
|
||||
if (!Number.isFinite(expiresAt.getTime()) || expiresAt <= now || !games.length || !Number.isFinite(highGame))
|
||||
return;
|
||||
var records = Array.isArray(highlight === null || highlight === void 0 ? void 0 : highlight.personalBestIds) ? highlight.personalBestIds : [];
|
||||
var highGameRecord = records.indexOf('bowling_high_game') >= 0;
|
||||
var highSeriesRecord = records.indexOf('bowling_high_series') >= 0 && Number.isFinite(seriesTotal);
|
||||
var title = highGameRecord
|
||||
? "".concat(highlight.displayName, "'s new high game: ").concat(highGame)
|
||||
: (highSeriesRecord
|
||||
? "".concat(highlight.displayName, "'s new high series: ").concat(seriesTotal)
|
||||
: "".concat(highlight.displayName, "'s high game: ").concat(highGame));
|
||||
var detail = [
|
||||
games.join(' / '),
|
||||
Number.isFinite(seriesTotal) ? "".concat(seriesTotal, " series") : '',
|
||||
Number.isFinite(Number(highlight === null || highlight === void 0 ? void 0 : highlight.weekNum)) ? "Week ".concat(highlight.weekNum) : ''
|
||||
].filter(Boolean).join(' · ');
|
||||
items.push({
|
||||
kicker: highGameRecord || highSeriesRecord ? 'BOWLING PERSONAL BEST' : 'TUESDAY BOWLING',
|
||||
title: title,
|
||||
detail: detail,
|
||||
icon: 'mdi:bowling',
|
||||
accent: '#7e57c2'
|
||||
});
|
||||
});
|
||||
}
|
||||
var phoneFeed = states['sensor.kiosk_recent_phone_notifications'];
|
||||
if (Array.isArray((_f = phoneFeed === null || phoneFeed === void 0 ? void 0 : phoneFeed.attributes) === null || _f === void 0 ? void 0 : _f.items)) {
|
||||
phoneFeed.attributes.items.forEach(function (notification) {
|
||||
if (Number(notification.expires_at) * 1000 <= now.getTime())
|
||||
return;
|
||||
items.push({
|
||||
kicker: "PHONE NOTIFICATION \u00B7 ".concat(notification.sent_time),
|
||||
title: notification.title,
|
||||
detail: notification.message,
|
||||
icon: notification.icon,
|
||||
accent: notification.color
|
||||
});
|
||||
});
|
||||
}
|
||||
var recordFeed = states['sensor.kiosk_recent_personal_records'];
|
||||
var personalRecords = (recordFeed === null || recordFeed === void 0 ? void 0 : recordFeed.state) === 'ready' ? (_g = recordFeed.attributes) === null || _g === void 0 ? void 0 : _g.items : null;
|
||||
if (Array.isArray(personalRecords)) {
|
||||
personalRecords.forEach(function (record) {
|
||||
var occurredAt = new Date((record === null || record === void 0 ? void 0 : record.occurredAt) || '');
|
||||
if (!Number.isFinite(occurredAt.getTime()) ||
|
||||
occurredAt > now || now - occurredAt > 7 * 24 * 60 * 60 * 1000 ||
|
||||
!(record === null || record === void 0 ? void 0 : record.person) || !(record === null || record === void 0 ? void 0 : record.label) || !(record === null || record === void 0 ? void 0 : record.displayValue))
|
||||
return;
|
||||
items.push({
|
||||
kicker: 'NEW PERSONAL BEST',
|
||||
title: "".concat(record.person, ": ").concat(record.label),
|
||||
detail: [record.displayValue, record.activityType, record.dayKey].filter(Boolean).join(' · '),
|
||||
icon: 'mdi:trophy-outline',
|
||||
accent: '#2e7d32'
|
||||
});
|
||||
});
|
||||
}
|
||||
var cruiseDays = Number.parseInt(state('sensor.next_booked_cruise_countdown'), 10);
|
||||
var cruiseEntity = states['sensor.next_booked_cruise_countdown'];
|
||||
var cruiseShip = String(((_h = cruiseEntity === null || cruiseEntity === void 0 ? void 0 : cruiseEntity.attributes) === null || _h === void 0 ? void 0 : _h.ship) || '').trim();
|
||||
var cruiseDate = String(((_j = cruiseEntity === null || cruiseEntity === void 0 ? void 0 : cruiseEntity.attributes) === null || _j === void 0 ? void 0 : _j.sail_date) || '').trim();
|
||||
if (Number.isInteger(cruiseDays) && cruiseDays >= 0 && cruiseShip && cruiseDate) {
|
||||
var sailDate = new Date("".concat(cruiseDate, "T12:00:00"));
|
||||
var sailLabel = Number.isFinite(sailDate.getTime())
|
||||
? sailDate.toLocaleDateString('en-US', { month: 'short', day: 'numeric' })
|
||||
: cruiseDate;
|
||||
var cruiseNights = Number.parseInt((_k = cruiseEntity === null || cruiseEntity === void 0 ? void 0 : cruiseEntity.attributes) === null || _k === void 0 ? void 0 : _k.nights, 10);
|
||||
var cruisePort = String(((_l = cruiseEntity === null || cruiseEntity === void 0 ? void 0 : cruiseEntity.attributes) === null || _l === void 0 ? void 0 : _l.port) || '').trim();
|
||||
var detail = [
|
||||
"Departs ".concat(sailLabel),
|
||||
Number.isInteger(cruiseNights) && cruiseNights > 0
|
||||
? "".concat(cruiseNights, " ").concat(cruiseNights === 1 ? 'night' : 'nights')
|
||||
: '',
|
||||
cruisePort
|
||||
].filter(Boolean).join(' · ');
|
||||
items.push({
|
||||
kicker: 'NEXT BOOKED CRUISE',
|
||||
title: cruiseDays === 0
|
||||
? "".concat(cruiseShip, " sails today")
|
||||
: "".concat(cruiseDays, " ").concat(cruiseDays === 1 ? 'day' : 'days', " until ").concat(cruiseShip),
|
||||
detail: detail,
|
||||
icon: 'mdi:ferry',
|
||||
accent: '#00838f'
|
||||
});
|
||||
}
|
||||
[
|
||||
['Carlo', 'person.carlo', 'sensor.carlo_location_display'],
|
||||
['Stacey', 'person.stacey', 'sensor.stacey_location_display'],
|
||||
['Justin', 'person.justin', 'sensor.justin_location_display'],
|
||||
['Paige', 'person.paige', 'sensor.paige_location_display']
|
||||
].forEach(function (_a) {
|
||||
var _b;
|
||||
var name = _a[0], personId = _a[1], locationId = _a[2];
|
||||
var personState = state(personId);
|
||||
if (valid(personState) && personState !== 'home') {
|
||||
var locationEntity = states[locationId];
|
||||
var rawLocation = pretty(valid(state(locationId)) ? state(locationId) : personState);
|
||||
var withoutName = rawLocation.replace(new RegExp("^".concat(name, "\\s+"), 'i'), '');
|
||||
var sinceMatch = withoutName.match(/\s*\(since\s+([^)]+)\)\s*$/i);
|
||||
var location = withoutName.replace(/\s*\(since\s+[^)]+\)\s*$/i, '').trim();
|
||||
var changedAt = new Date((locationEntity === null || locationEntity === void 0 ? void 0 : locationEntity.last_changed) || ((_b = states[personId]) === null || _b === void 0 ? void 0 : _b.last_changed));
|
||||
var since = (sinceMatch === null || sinceMatch === void 0 ? void 0 : sinceMatch[1]) || (Number.isFinite(changedAt.getTime())
|
||||
? changedAt.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit' })
|
||||
: 'recently');
|
||||
items.push({
|
||||
kicker: 'FAMILY LOCATION',
|
||||
title: "".concat(name, " - ").concat(location || pretty(personState)),
|
||||
detail: "Since ".concat(since),
|
||||
icon: 'mdi:map-marker-account-outline',
|
||||
accent: '#6a1b9a',
|
||||
action: {
|
||||
service: 'kitchen_kiosk_show_detail',
|
||||
data: { detail_type: 'family', detail_subject: personId }
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (items.length === 0) {
|
||||
items.push({
|
||||
kicker: 'HOUSEHOLD',
|
||||
title: 'Everything is handled',
|
||||
detail: 'Everyone is home and there are no active reminders',
|
||||
icon: 'mdi:check-circle-outline',
|
||||
accent: '#2e7d32'
|
||||
});
|
||||
}
|
||||
return { items: items, state: state, valid: valid, pretty: pretty, dateKey: dateKey, cleanAlertText: cleanAlertText, alertSection: alertSection, limitAlertText: limitAlertText, uniqueWeatherAlerts: uniqueWeatherAlerts, phynAlerts: phynAlerts, rheemProblem: rheemProblem };
|
||||
}
|
||||
root.BearStoneKioskAmbient = { version: '1.2.0', seasonal: seasonal, dependencies: ["sensor.holiday_lighting_mode", "binary_sensor.garage_phyn_battery_alert", "binary_sensor.garage_phyn_freeze_warning_alert", "binary_sensor.garage_phyn_high_pressure_alert", "binary_sensor.garage_phyn_leak_alert", "binary_sensor.garage_phyn_offline_leak_shutoff_alert", "binary_sensor.garage_phyn_pinhole_leak_alert", "binary_sensor.garage_phyn_recurring_flow_alert", "binary_sensor.garage_phyn_temperature_alert", "valve.phyn_shutoff_valve", "sensor.phyn_current_water_pressure", "sensor.phyn_average_water_flow_rate", "sensor.nws_alerts_alerts", "group.garage_doors", "group.entry_points", "group.locks", "binary_sensor.front_door_packages_present", "sensor.rheem_wh_available_hot_water", "sensor.rheem_wh_alert_count", "sensor.rheem_wh_diagnostic_status", "binary_sensor.rheem_wh_problem", "binary_sensor.rheem_wh_active_alert", "binary_sensor.rheem_wh_telemetry_stale", "binary_sensor.rheem_wh_running", "sensor.rheem_wh_tank_health", "sensor.rheem_wh_compressor_health", "water_heater.rheem_wh", "light.sink", "input_boolean.garbage_cans_out", "input_datetime.water_delivery_date", "sensor.water_softener_salt_days_since_last_add", "sensor.water_softener_salt_average_days_between_refills", "sensor.spaceship_battery_level", "switch.spaceship_charge", "input_datetime.tesla_model_y_last_garage_close", "input_datetime.tesla_model_y_plug_in_snooze_until", "sensor.next_booked_cruise_countdown", "sensor.bearclaw_status_telemetry", "sensor.kiosk_recent_personal_records", "sensor.kiosk_recent_phone_notifications", "person.carlo", "person.stacey", "person.justin", "person.paige", "sensor.carlo_location_display", "sensor.stacey_location_display", "sensor.justin_location_display", "sensor.paige_location_display", "binary_sensor.kiosk_rain_radar_weather_event", "binary_sensor.kiosk_rain_radar_active", "timer.kitchen_kiosk_radar_display", "input_text.kitchen_kiosk_detail_view", "timer.kitchen_kiosk_detail_display", "sensor.kiosk_active_camera_view", "camera.frontdoorbell"], build: build };
|
||||
}(window));
|
||||
@ -0,0 +1,393 @@
|
||||
Attribution 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More_considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution 4.0 International Public License ("Public License"). To the
|
||||
extent this Public License may be interpreted as a contract, You are
|
||||
granted the Licensed Rights in consideration of Your acceptance of
|
||||
these terms and conditions, and the Licensor grants You such rights in
|
||||
consideration of benefits the Licensor receives from making the
|
||||
Licensed Material available under these terms and conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
d. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
e. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
f. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
g. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
h. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
i. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
j. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
k. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
4. If You Share Adapted Material You produce, the Adapter's
|
||||
License You apply must not prevent recipients of the Adapted
|
||||
Material from complying with this Public License.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public licenses.
|
||||
Notwithstanding, Creative Commons may elect to apply one of its public
|
||||
licenses to material it publishes and in those instances will be
|
||||
considered the "Licensor." Except for the limited purpose of indicating
|
||||
that material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the public
|
||||
licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
@ -0,0 +1,3 @@
|
||||
# Seasonal artwork
|
||||
|
||||
Local compositions of [Twemoji graphics](https://github.com/jdecked/twemoji), copyright Twitter, Inc. and other contributors, licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Source revision: `b6b55fef1e8636b540a6d016a4729ca8cdf2e60b`. The original shapes and colors are preserved; paired compositions change size and placement. See `LICENSE-GRAPHICS.txt` and `sources.json`. Artwork is served locally without runtime requests to external services.
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 891 B |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 909 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
@ -0,0 +1,118 @@
|
||||
{
|
||||
"repository": "https://github.com/jdecked/twemoji",
|
||||
"revision": "b6b55fef1e8636b540a6d016a4729ca8cdf2e60b",
|
||||
"artwork": {
|
||||
"halloween": {
|
||||
"label": "Halloween",
|
||||
"source_svg": [
|
||||
"1f383.svg",
|
||||
"1f47b.svg"
|
||||
]
|
||||
},
|
||||
"thanksgiving": {
|
||||
"label": "Thanksgiving",
|
||||
"source_svg": [
|
||||
"1f983.svg",
|
||||
"1f342.svg"
|
||||
]
|
||||
},
|
||||
"christmas": {
|
||||
"label": "Christmas",
|
||||
"source_svg": [
|
||||
"1f384.svg",
|
||||
"1f385.svg"
|
||||
]
|
||||
},
|
||||
"hanukkah": {
|
||||
"label": "Hanukkah",
|
||||
"source_svg": [
|
||||
"1f54e.svg",
|
||||
"2721.svg"
|
||||
]
|
||||
},
|
||||
"rwb": {
|
||||
"label": "Stars & Stripes",
|
||||
"source_svg": [
|
||||
"1f1fa-1f1f8.svg",
|
||||
"2b50.svg"
|
||||
]
|
||||
},
|
||||
"new_years_day": {
|
||||
"label": "New Year",
|
||||
"source_svg": [
|
||||
"1f389.svg",
|
||||
"1f386.svg"
|
||||
]
|
||||
},
|
||||
"valentine": {
|
||||
"label": "Valentine's Day",
|
||||
"source_svg": [
|
||||
"2764.svg",
|
||||
"1f495.svg"
|
||||
]
|
||||
},
|
||||
"mardi_gras": {
|
||||
"label": "Mardi Gras",
|
||||
"source_svg": [
|
||||
"1f3ad.svg",
|
||||
"269c.svg"
|
||||
]
|
||||
},
|
||||
"pi": {
|
||||
"label": "Pi Day",
|
||||
"source_svg": [
|
||||
"1f967.svg",
|
||||
"2728.svg"
|
||||
]
|
||||
},
|
||||
"st_patty": {
|
||||
"label": "St. Patrick's Day",
|
||||
"source_svg": [
|
||||
"2618.svg",
|
||||
"1f308.svg"
|
||||
]
|
||||
},
|
||||
"easter": {
|
||||
"label": "Easter",
|
||||
"source_svg": [
|
||||
"1f430.svg",
|
||||
"1f95a.svg"
|
||||
]
|
||||
},
|
||||
"starwars": {
|
||||
"label": "Star Wars Day",
|
||||
"source_svg": [
|
||||
"2b50.svg",
|
||||
"1f680.svg"
|
||||
]
|
||||
},
|
||||
"cinco_de_mayo": {
|
||||
"label": "Cinco de Mayo",
|
||||
"source_svg": [
|
||||
"1f335.svg",
|
||||
"1f389.svg"
|
||||
]
|
||||
},
|
||||
"mothers_day": {
|
||||
"label": "Mother's Day",
|
||||
"source_svg": [
|
||||
"1f338.svg",
|
||||
"1f490.svg"
|
||||
]
|
||||
},
|
||||
"fathers_day": {
|
||||
"label": "Father's Day",
|
||||
"source_svg": [
|
||||
"1f3a9.svg",
|
||||
"1f454.svg"
|
||||
]
|
||||
},
|
||||
"veterans": {
|
||||
"label": "Veterans Day",
|
||||
"source_svg": [
|
||||
"2b50.svg",
|
||||
"1f396.svg"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 634 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 555 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 369 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 555 B |
|
After Width: | Height: | Size: 1.7 KiB |