Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ docstring gives: it is a record, not a claim about now.

## 2026-11-18

- **The wall's Home row reads the thermostat and the Litter-Robot.** The
second of the wall's five steps. The row gains the hallway thermostat's
temperature and humidity, and "heating" or "cooling" while it is, read
from `climate.thermostat` at `/api/ha/thermostat`. The Litter-Robot
appears in amber only when it wants something: a new `sensor.wall_litter`
in `wall_house.yaml` says which, by `litter_robot.yaml`'s own thresholds.
An unreadable Litter-Robot shows as `—`, not as nothing. Doors and windows
share one item when all are shut, and a row too long for the screen drops
the office lights, then the thermostat, never an amber item; warnings
still too wide say how many instead of which. The mockup's front-door lock is left out: the house has no smart
lock for it to read. Previewed at 1920x1080 against stubbed answers,
quiet and with two openings and the Litter-Robot at once. Not yet run
against the real Home Assistant.
- **The wall gets a week, a countdown and a context card.** The first of
five steps that take the useful ideas from a denser mockup of the office
wall without shrinking its text below what reads from the chair.
Expand Down
5 changes: 3 additions & 2 deletions docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -1145,10 +1145,11 @@ from Home Assistant with *not enough permissions*.
firing alerts, per-host CPU, SNMP reachability, WAN traffic and latency,
the UPS and `heimdall`'s temperature. That is less than the Homelab page
already shows, and the page and the Pi hold no credential.
**Its household half reads eleven Home Assistant entities the same way.**
**Its household half reads thirteen Home Assistant entities the same way.**
Each `/api/ha/NAME` is one `GET /api/states/<entity>` written in the
Caddyfile: the weather, today's forecast, the alarm's mode, four door
contacts, two window contacts, the office lights, and `sensor.wall_today`,
contacts, two window contacts, the office lights, the thermostat, the
Litter-Robot's summary, and `sensor.wall_today`,
which holds the next seven days' calendar events. Caddy adds the token of HA's non-admin
`wall` user. Home Assistant has no read-only role, so that token could call
services, the alarm's included. It is read-only only because it lives in
Expand Down
15 changes: 15 additions & 0 deletions stacks/sensitive/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,21 @@ wall.matrix.elysium {
import wall_ha
}

# The hallway thermostat: temperature, humidity and whether it is
# heating or cooling (home-assistant/packages/thermostat.yaml says
# what it is). Its id names no room of anyone's.
handle /api/ha/thermostat {
rewrite * /api/states/climate.thermostat?
import wall_ha
}

# The Litter-Robot: ok, or attention and what, through a template
# entity in home-assistant/packages/wall_house.yaml.
handle /api/ha/litter {
rewrite * /api/states/sensor.wall_litter?
import wall_ha
}

# Today's high and low, the next rain and the next sunrise or sunset,
# asked of weather.get_forecasts by
# home-assistant/packages/wall_weather.yaml: since HA 2024.4 a forecast
Expand Down
10 changes: 9 additions & 1 deletion stacks/sensitive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,15 @@ container of its own: Caddy serves `wall/` as static files.
house's one alarm panel) and `binary_sensor.wall_office_lights` (on when
any light whose id contains `office` is on).
The page shows them as the header's weather and a one-line Home row: the
alarm's mode, any open door or window in amber, and the office lights.
alarm's mode, any open door or window in amber, the hallway thermostat's
temperature, humidity and whether it is heating or cooling (read from
`climate.thermostat` at `/api/ha/thermostat`), the office lights, and the
Litter-Robot in amber only when it wants something (`sensor.wall_litter`
at `/api/ha/litter`, from `wall_house.yaml`), and as `—` when it cannot be
read. A row too long for the screen drops the office lights first, then
the thermostat, then an unreadable Litter-Robot's `—`, never an amber
item; if the warnings alone are still too wide, each says how many
instead of which ("6 doors & windows").
The header's high and low, the next rain and the next sunrise or sunset
are `sensor.wall_weather` at `/api/ha/forecast`, from
`home-assistant/packages/wall_weather.yaml`, which asks
Expand Down
2 changes: 1 addition & 1 deletion stacks/sensitive/home-assistant/packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ and nothing else. This README is not YAML and Home Assistant ignores it.
| `thermostat.yaml` | Thermostat alerts, no control: the hallway too cold or hot, humidity out of range, emergency heat switched on, the thermostat gone from Honeywell's cloud, or its gateway gone from the network (from its DHCP renewals in Loki). Each condition is a template binary sensor, so a restart does not lose it. Alerts go to phones labelled `household_phones` and to Home Assistant's notifications. The thermostat keeps its own schedule |
| `tv_room_evening.yaml` | At 19:00 the TV comes on with Prime Video open and the TV room at its Mood scene; at 21:00 a bedtime nudge on the living-room Echo and the TV. A pause switch skips both |
| `wall_calendar.yaml` | `sensor.wall_today`: the next seven days' events, asked of `calendar.get_events` every five minutes, for the office wall's Today panel, its week below tomorrow and the header's *Up next* (ADR-0119). The calendars are those labelled `wall_calendar` in the UI, or all of them when none is labelled, so no calendar is named here. Unavailable, not empty, when a calendar cannot be read |
| `wall_house.yaml` | `sensor.wall_alarm` and `binary_sensor.wall_office_lights` for the office wall (ADR-0119): the house's one alarm panel's mode, and whether any light whose id contains `office` is on. Their own ids name the city and a person, so the wall reads these instead. Unavailable when nothing matches |
| `wall_house.yaml` | `sensor.wall_alarm`, `binary_sensor.wall_office_lights` and `sensor.wall_litter` for the office wall (ADR-0119): the house's one alarm panel's mode, and whether any light whose id contains `office` is on. Their own ids name the city and a person, so the wall reads these instead. Unavailable when nothing matches. `sensor.wall_litter` is `ok` or `attention`, with what in `needs`: the drawer at 90%, the litter under 30% or a cat's weight dropping, `litter_robot.yaml`'s thresholds |
| `wall_weather.yaml` | `sensor.wall_weather` for the office wall's header (ADR-0119): today's high and low, the first of the next six hours with rain or snow, and `sun.sun`'s next sunrise and sunset. Asked of `weather.get_forecasts` on `weather.forecast_home` every fifteen minutes, because a forecast is an action's answer, not an attribute. Unavailable only when neither the daily nor the hourly forecast answers; with no daily entry for today, the state is `none` and the rain and sun still come through |

Home Assistant reads these files only when it starts, and the directory is
Expand Down
36 changes: 34 additions & 2 deletions stacks/sensitive/home-assistant/packages/wall_house.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# The alarm's mode and the office lights, as two entities the office wall can
# read by a fixed id (ADR-0119).
# The alarm's mode, the office lights and the Litter-Robot, as entities the
# office wall can read by a fixed id (ADR-0119).
#
# The wall reads Home Assistant through fixed `GET /api/states/<entity>`
# handles in the Caddyfile. The Ring Alarm's own entity id names the city, and
Expand Down Expand Up @@ -39,3 +39,35 @@ template:
availability: >-
{{ states.light | selectattr('entity_id', 'search', 'office')
| rejectattr('state', 'in', ['unavailable', 'unknown']) | list | count > 0 }}

# The Litter-Robot, for the wall's Home row, which shows it only when it
# wants something: `ok`, or `attention` with what, in `needs`. The
# thresholds are litter_robot.yaml's reminder's (drawer at 90%, litter
# under 30%) and its weight sensors', so the wall and the phones agree.
# Its own sensors' ids are already in that file and name no person; this
# one exists so the thresholds live here, not in the page.
- sensor:
- name: Wall litter
unique_id: wall_litter
icon: mdi:cat
state: >-
{% set drawer = states('sensor.litter_robot_4_waste_drawer') | float(0) %}
{% set litter = states('sensor.litter_robot_4_litter_level') | float(100) %}
{% set cats = states.binary_sensor | selectattr('entity_id', 'search', '_weight_dropping$')
| selectattr('state', 'eq', 'on') | list | count %}
{{ 'attention' if drawer >= 90 or litter < 30 or cats > 0 else 'ok' }}
availability: >-
{{ has_value('sensor.litter_robot_4_waste_drawer')
and has_value('sensor.litter_robot_4_litter_level') }}
attributes:
# Short phrases, in the order the wall shows them.
needs: >-
{% set drawer = states('sensor.litter_robot_4_waste_drawer') | float(0) %}
{% set litter = states('sensor.litter_robot_4_litter_level') | float(100) %}
{% set cats = states.binary_sensor | selectattr('entity_id', 'search', '_weight_dropping$')
| selectattr('state', 'eq', 'on') | list | count %}
{% set n = namespace(items=[]) %}
{% if drawer >= 90 %}{% set n.items = n.items + ['drawer full'] %}{% endif %}
{% if litter < 30 %}{% set n.items = n.items + ['litter low'] %}{% endif %}
{% if cats > 0 %}{% set n.items = n.items + ['cat weight'] %}{% endif %}
{{ n.items }}
67 changes: 58 additions & 9 deletions stacks/sensitive/wall/wall.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
const WINDOWS = [["window_left", "Left"], ["window_right", "Right"]];
// "forecast" is sensor.wall_weather: today's high and low, the next rain and
// the next sunrise or sunset (home-assistant/packages/wall_weather.yaml).
const HOUSE = ["weather", "forecast", "alarm", "office_light", ...DOORS.map((d) => d[0]), ...WINDOWS.map((w) => w[0])];
// "thermostat" is climate.thermostat itself; "litter" is sensor.wall_litter
// (home-assistant/packages/wall_house.yaml).
const HOUSE = ["weather", "forecast", "alarm", "office_light", "thermostat", "litter",
...DOORS.map((d) => d[0]), ...WINDOWS.map((w) => w[0])];
// "today" is sensor.wall_today: the calendars' events for the next seven
// days, gathered by home-assistant/packages/wall_calendar.yaml.
const HA = [...HOUSE, "today"];
Expand Down Expand Up @@ -404,11 +407,31 @@
armed_night: ["Night", ""], arming: ["Arming", "warn"], pending: ["Entry delay", "alert"],
triggered: ["TRIGGERED", "alert"],
};
function homeItem(label, value, cls) {
// `drop` marks an item the row may leave out when it runs out of width:
// the higher, the sooner it goes. Unmarked items always stay. `compact` is
// a shorter value an item that always stays may fall back to.
function homeItem(label, value, cls, drop, compact) {
const span = el("span", `item ${cls || ""}`, label);
span.append(el("b", null, value));
if (drop) span.dataset.drop = String(drop);
if (compact) span.dataset.compact = compact;
return span;
}
// A crowded row loses its quiet items first, whole, never half a word.
// If the warnings alone are still too wide, each says how many instead of
// which ("6 open"), which always fits, so no warning is ever clipped.
function fitRow(row) {
const over = () => row.scrollWidth > row.clientWidth + 2;
while (over()) {
const items = [...row.querySelectorAll("[data-drop]")];
if (!items.length) break;
items.sort((a, b) => Number(b.dataset.drop) - Number(a.dataset.drop))[0].remove();
}
for (const item of row.querySelectorAll("[data-compact]")) {
if (!over()) return;
item.querySelector("b").textContent = item.dataset.compact;
}
}
function openOf(list) {
let unknown = false;
const open = [];
Expand All @@ -429,19 +452,45 @@
row.append(homeItem("Alarm", "—", "unknown"));
}

// Doors and windows share one item: all shut is one fact, and the row
// needs the room. What is open is named, a window as "Left window".
const doors = openOf(DOORS);
if (doors.open.length) row.append(homeItem("Open", doors.open.join(", "), "warn"));
else row.append(homeItem("Doors", doors.unknown ? "—" : "all closed", doors.unknown ? "unknown" : ""));

const wins = openOf(WINDOWS);
if (wins.open.length) row.append(homeItem("Window open", wins.open.join(", "), "warn"));
else row.append(homeItem("Windows", wins.unknown ? "—" : "closed", wins.unknown ? "unknown" : ""));
const open = [...doors.open, ...wins.open.map((w) => `${w} window`)];
if (open.length) row.append(homeItem("Open", open.join(", "), "warn", 0, `${open.length} doors & windows`));
else if (doors.unknown || wins.unknown) row.append(homeItem("Doors & windows", "—", "unknown"));
else row.append(homeItem("Doors & windows", "closed"));

// The hallway thermostat. Its own alerts are thermostat.yaml's; this is
// the reading, with what it is doing when it is doing something.
if (haFresh("thermostat")) {
const t = states.thermostat.attributes || {};
const bits = [];
if (t.current_temperature != null) bits.push(`${Math.round(t.current_temperature)}°`);
if (t.current_humidity != null) bits.push(`${Math.round(t.current_humidity)}%`);
if (t.hvac_action === "heating" || t.hvac_action === "cooling") bits.push(t.hvac_action);
row.append(homeItem("Inside", bits.length ? bits.join(" · ") : "—", bits.length ? "" : "unknown", 2));
} else {
row.append(homeItem("Inside", "—", "unknown", 2));
}

if (haFresh("office_light")) {
row.append(homeItem("Office lights", states.office_light.state === "on" ? "on" : "off"));
row.append(homeItem("Office lights", states.office_light.state === "on" ? "on" : "off", "", 3));
} else {
row.append(homeItem("Office lights", "—", "unknown"));
row.append(homeItem("Office lights", "—", "unknown", 3));
}

// The Litter-Robot when it wants something, in amber, and as "—" when it
// cannot be read, so an outage never looks like all is well. Quiet when
// it is fine. The "—" is the last quiet item a crowded row drops.
if (!haFresh("litter")) {
row.append(homeItem("Litter-Robot", "—", "unknown", 1));
} else if (states.litter.state === "attention") {
const needs = (states.litter.attributes || {}).needs || [];
row.append(homeItem("Litter-Robot", needs.length ? needs.join(", ") : "needs a look", "warn", 0,
needs.length > 1 ? `${needs.length} things` : undefined));
}
fitRow(row);
}

// ---------- today: the calendar ----------
Expand Down