Let Wake only light the screen, and open ESP Screens without a chosen screen (0.2.65)
Wake from Home Assistant counted as a tap: it reset last_touch_ms, the one clock that standby and Back to page 1 both read. An automation pressing Wake on every motion therefore held an open card or page 2 up for as long as someone moved in the room. Back to page 1 now has its own clock, last_use_ms, written only by the boot, the touchscreen triggers, open_settings from Home Assistant and the UI self test. Wake, an alert ending and Auto standby on still restart the standby time, and Wake still brings back the brightness and the second hand. The rule moved from the interval into the script back_to_page_1_when_due. Wake runs it right after waking a dimmed screen, so a page whose time ran out during standby lights up on page 1 instead of jumping there a second later. ESP Screens no longer opens the first screen by itself. Until one is picked the page says "Choose a screen", and with no screens it still offers the install; both cards start hidden so neither flashes while the page loads. Checked with 48 host API checks per board, both ESP32 builds, 314 Python and 16 C++ tests, and the editor on the demo home. Firmware 0.2.56. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -76,6 +76,7 @@ function select(id) {
|
||||
$("#open-override").disabled = !screen.update?.profile;
|
||||
$("#editor").hidden = false;
|
||||
$("#empty").hidden = true;
|
||||
$("#choose").hidden = true;
|
||||
$("#dirty").textContent = "All saved";
|
||||
$("#save-detail").textContent = "Changes apply without reflashing.";
|
||||
renderScreens();
|
||||
@@ -494,6 +495,12 @@ function renderPending() {
|
||||
}
|
||||
function renderScreens() {
|
||||
renderPending();
|
||||
// ESP Screens opens without a chosen screen (app 0.2.65+): the owner picks one. Until then the right side asks
|
||||
// for that, or offers the install while there are no screens yet.
|
||||
if (!selected) {
|
||||
$("#choose").hidden = !inventory.screens.length;
|
||||
$("#empty").hidden = !!inventory.screens.length;
|
||||
}
|
||||
// Keep an open address form alive across the periodic refresh.
|
||||
if ($("#screens .screen-host")) {
|
||||
renderUpdates();
|
||||
@@ -2059,7 +2066,6 @@ async function refresh(full = true) {
|
||||
if (full) renderClaude();
|
||||
if (selected) { settleSettings(); renderSettings(); }
|
||||
if (firstCatalogue && selected && layout && !drag.active && !chipDrag.active) { renderTopbar(); renderTiles(); renderResults(); }
|
||||
if (!selected && inventory.screens.length) select(inventory.screens[0].id);
|
||||
if ($("#alerts-dialog").open) renderAlertScreens();
|
||||
} catch {
|
||||
$("#connection").textContent =
|
||||
@@ -2391,7 +2397,6 @@ function applyLive(data) {
|
||||
$("#connection").classList.toggle("online", inventory.connected);
|
||||
renderScreens();
|
||||
if (selected) { settleSettings(); renderSettings(); }
|
||||
if (!selected && inventory.screens.length) select(inventory.screens[0].id);
|
||||
}
|
||||
function listen() {
|
||||
if (stream || typeof EventSource === "undefined") return;
|
||||
|
||||
@@ -42,7 +42,13 @@
|
||||
<div id="pending"></div>
|
||||
<button class="quiet" id="refresh">↻ Refresh</button>
|
||||
</aside>
|
||||
<section id="empty" class="empty">
|
||||
<!-- Hidden until the first inventory, so neither card flashes while the page loads. -->
|
||||
<section id="choose" class="empty" hidden>
|
||||
<span class="empty-icon">▦</span>
|
||||
<h2>Choose a screen</h2>
|
||||
<p>Pick one of your screens to change its tiles, top bar and settings.</p>
|
||||
</section>
|
||||
<section id="empty" class="empty" hidden>
|
||||
<span class="empty-icon">▦</span>
|
||||
<h2>Start with a screen</h2>
|
||||
<p>
|
||||
|
||||
@@ -735,6 +735,14 @@ dialog label {
|
||||
#editor {
|
||||
padding: 18px;
|
||||
}
|
||||
/* The screens sit right above it on a phone: a short prompt, not a tall empty card. */
|
||||
#choose {
|
||||
min-height: 0;
|
||||
padding: 18px;
|
||||
}
|
||||
#choose .empty-icon {
|
||||
display: none;
|
||||
}
|
||||
.savebar {
|
||||
align-items: stretch;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user