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
15 changes: 15 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ docstring gives: it is a record, not a claim about now.

## 2026-11-18

- **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.
`wall_calendar.yaml` now asks for seven days: today and tomorrow stay in
full, the rest of the week shows below them in grey while the box has
room, and the header counts down to the next timed event on a ring that
turns amber inside fifteen minutes. A new `wall_weather.yaml` gives the
header today's high and low, the next rain within six hours and the next
sunrise or sunset, at `/api/ha/forecast`. The Power card's cell becomes a
context card that shows one thing at a time by precedence, a Hebrew word
of the day until its other sources arrive; the UPS's mains or battery,
charge and runtime moved into `mjolnir`'s tile, which turns red on
battery. Previewed at 1920x1080 in a browser against stubbed answers,
including on battery with an alert firing. Not yet run against the real
Home Assistant.
- **`fenrir` sheds the last of its audit's leftovers.** The audit of
2026-11-13 listed, as its finding 10, `atreus` in `lxd` with no LXD
installed, an idle `docker0` and the `hwctl` snap, and called them
Expand Down
8 changes: 4 additions & 4 deletions docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -1145,11 +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 ten Home Assistant entities the same way.**
**Its household half reads eleven Home Assistant entities the same way.**
Each `/api/ha/NAME` is one `GET /api/states/<entity>` written in the
Caddyfile: the weather, the alarm's mode, four door contacts, two window
contacts, the office lights, and `sensor.wall_today`, which holds today's
and tomorrow's calendar events. Caddy adds the token of HA's non-admin
Caddyfile: the weather, today's forecast, the alarm's mode, four door
contacts, two window contacts, the office lights, 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
Caddy's environment alone and Caddy forwards nothing but those GETs. The
Expand Down
11 changes: 10 additions & 1 deletion stacks/sensitive/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,16 @@ wall.matrix.elysium {
import wall_ha
}

# Today's and tomorrow's events, gathered from the calendars by
# 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
# is an action's answer, not an attribute a fixed handle can read.
handle /api/ha/forecast {
rewrite * /api/states/sensor.wall_weather?
import wall_ha
}

# The next seven days' events, gathered from the calendars by
# home-assistant/packages/wall_calendar.yaml. A calendar's own API needs
# a moving start and end, which a fixed handle cannot give.
handle /api/ha/today {
Expand Down
14 changes: 12 additions & 2 deletions stacks/sensitive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -784,12 +784,22 @@ container of its own: Caddy serves `wall/` as static files.
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.
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
`weather.get_forecasts` every fifteen minutes.
The calendar is `sensor.wall_today` at `/api/ha/today`: the package
`home-assistant/packages/wall_calendar.yaml` asks `calendar.get_events`
every five minutes for today and tomorrow, from the calendars labelled
every five minutes for the next seven days, from the calendars labelled
`wall_calendar` in HA's UI, or from every calendar when none is labelled.
It keeps each event's title, start, end, location and a calendar number for
its colour, and shows them in the Today panel under the alerts. Booted on
its colour. The page shows today and tomorrow in the Today panel under the
alerts, the rest of the week below them while there is room, and a
countdown to the next timed event in the header. The cell beside Internet
is a context card that shows one thing at a time, whichever matters now
(`CONTEXT` in `wall.js`); until other sources arrive that is a Hebrew word
of the day from a static list in the page. The UPS's mains or battery,
charge and runtime are in its node tile, `mjolnir`. Booted on
Home Assistant 2026.11.1 against its demo calendars on 2026-11-18: the
sensor held both events, and with no calendar it read unavailable, which
the page shows as `calendar · unavailable`. The real ids of the alarm and the
Expand Down
3 changes: 2 additions & 1 deletion stacks/sensitive/home-assistant/packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ and nothing else. This README is not YAML and Home Assistant ignores it.
| `roomba.yaml` | *Roomba: start / stop / dock* scripts that ask the living-room Echo, through `alexa_devices.send_text_command`, to drive the Roomba 105 linked in Alexa. The core `roomba` integration does not support x05 models. One-way, cloud, with phrases editable in the UI |
| `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`: today's and tomorrow's events, asked of `calendar.get_events` every five minutes, for the office wall's Today panel (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_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_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
mounted as a whole, so a changed package is visible inside the container at
Expand Down
14 changes: 9 additions & 5 deletions stacks/sensitive/home-assistant/packages/wall_calendar.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
---
# Today's and tomorrow's events, as one sensor the office wall can read
# (ADR-0119).
# The next seven days' events, today's first, as one sensor the office wall
# can read (ADR-0119). The wall shows today and tomorrow in full, the rest of
# the week below them when there is room, and counts down to the next one.
#
# The wall reads Home Assistant through fixed `GET /api/states/<entity>`
# handles in the Caddyfile. A calendar's own state is only its next event, and
# HA's calendar API needs a moving start and end that a fixed handle cannot
# give. So this asks `calendar.get_events` every five minutes and keeps the
# answer in `sensor.wall_today`, which the wall reads at `/api/ha/today`.
# answer in `sensor.wall_today`, which the wall reads at `/api/ha/today`. The
# id predates the week; it keeps its name so its history does not split.
#
# Which calendars: the ones labelled `wall_calendar` in the UI, or every
# calendar when no calendar carries that label. No calendar is named here.
Expand Down Expand Up @@ -45,7 +47,7 @@ template:
entity_id: "{{ wall_calendars }}"
data:
start_date_time: "{{ today_at() }}"
end_date_time: "{{ today_at() + timedelta(days=2) }}"
end_date_time: "{{ today_at() + timedelta(days=7) }}"
response_variable: agenda
continue_on_error: true
- variables:
Expand Down Expand Up @@ -82,7 +84,9 @@ template:
{% endfor %}
{% endfor %}
{% endif %}
{{ (ns.items | sort(attribute='key'))[:16] }}
{# 40 events of at most ~250 bytes stay under the recorder's 16 KB
attribute limit, so the sensor's history keeps its attributes. #}
{{ (ns.items | sort(attribute='key'))[:40] }}
sensor:
- name: Wall today
unique_id: wall_today
Expand Down
86 changes: 86 additions & 0 deletions stacks/sensitive/home-assistant/packages/wall_weather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
# Today's high and low, the next rain, and the next sunrise or sunset, as one
# sensor the office wall can read (ADR-0119).
#
# The weather entity's own state is the present only: since HA 2024.4 its
# forecast is not an attribute but the answer to `weather.get_forecasts`, which
# a fixed `GET /api/states/<entity>` handle cannot ask. So this asks every
# fifteen minutes and keeps the answer in `sensor.wall_weather`, which the wall
# reads at `/api/ha/forecast`. The header's temperature and condition still
# come from the weather entity itself, at `/api/ha/weather`.
#
# Which weather entity: `weather.forecast_home`, the home zone's forecast
# (the Met.no default), the same one the Caddyfile already reads. It names no
# place. Sunrise and sunset come from `sun.sun`, also at the home zone.

template:
- triggers:
- trigger: time_pattern
minutes: /15
- trigger: homeassistant
event: start
- trigger: event
event_type: event_template_reloaded
actions:
- action: weather.get_forecasts
target:
entity_id: weather.forecast_home
data:
type: daily
response_variable: daily
continue_on_error: true
- action: weather.get_forecasts
target:
entity_id: weather.forecast_home
data:
type: hourly
response_variable: hourly
continue_on_error: true
- variables:
wall_days: >-
{{ daily['weather.forecast_home'].forecast
if daily is defined and daily is mapping
and 'weather.forecast_home' in daily else [] }}
wall_hours: >-
{{ hourly['weather.forecast_home'].forecast
if hourly is defined and hourly is mapping
and 'weather.forecast_home' in hourly else [] }}
# Today's entry, by local date. Late in the evening Met.no's first
# daily entry can already be tomorrow, and that is not today's high.
wall_day: >-
{% set today = now().date() %}
{% set ns = namespace(day=none) %}
{% for d in wall_days %}
{% if ns.day is none and as_local(as_datetime(d.datetime)).date() == today %}
{% set ns.day = d %}
{% endif %}
{% endfor %}
{{ ns.day if ns.day is not none else {} }}
# The first of the next six hours with rain or snow in it.
wall_rain: >-
{% set wet = ['rainy', 'pouring', 'snowy', 'snowy-rainy', 'lightning-rainy', 'hail'] %}
{% set ns = namespace(at='') %}
{% for h in wall_hours[:6] %}
{% if not ns.at and (h.condition in wet or (h.precipitation or 0) >= 0.2) %}
{% set ns.at = as_local(as_datetime(h.datetime)).isoformat() %}
{% endif %}
{% endfor %}
{{ ns.at }}
sensor:
- name: Wall weather
unique_id: wall_weather
icon: mdi:weather-partly-cloudy
# Available while either forecast answered, so a missing daily entry
# for today (late in the evening) costs only the high and low, not the
# rain and the sun. The state is today's high, or `none` when there is
# none: a word rather than HA's `unknown`, which the wall reads as no
# answer at all. So no unit, since the state is not always a number.
availability: "{{ wall_days | count > 0 or wall_hours | count > 0 }}"
state: "{{ wall_day.temperature if wall_day.temperature is defined else 'none' }}"
attributes:
high: "{{ wall_day.temperature | default(none) }}"
low: "{{ wall_day.templow | default(none) }}"
# An ISO time when rain or snow is expected within six hours, or ''.
rain_at: "{{ wall_rain }}"
next_rising: "{{ state_attr('sun.sun', 'next_rising') }}"
next_setting: "{{ state_attr('sun.sun', 'next_setting') }}"
27 changes: 18 additions & 9 deletions stacks/sensitive/wall/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,20 @@
<div class="clock"><span id="hm">--:--</span><span class="ampm" id="ampm"></span></div>
<div class="date" id="date"></div>
</div>
<div class="next" id="next" data-state="none">
<svg class="ring" viewBox="0 0 72 72" aria-hidden="true">
<circle class="track" cx="36" cy="36" r="30"></circle>
<circle class="arc" id="next-arc" cx="36" cy="36" r="30" stroke-dashoffset="188.5" transform="rotate(-90 36 36)"></circle>
</svg>
<div class="next-text">
<div class="lbl">Up next</div>
<div class="next-what" id="next-what">—</div>
<div class="next-when" id="next-when"></div>
</div>
</div>
<div class="wx" id="wx">
<div class="wx-temp" id="wx-temp">—</div>
<div class="wx-desc"><div id="wx-cond">—</div><div class="wx-sub" id="wx-sub"></div></div>
<div class="wx-desc"><div id="wx-cond">—</div><div class="wx-sub" id="wx-sub"></div><div class="wx-sub" id="wx-sub2"></div></div>
</div>
<div class="verdict" id="verdict" data-state="unknown">
<span class="dot"></span><span id="verdict-text">Waiting for Prometheus</span>
Expand Down Expand Up @@ -68,14 +79,12 @@ <h2 id="h-wan">Internet</h2>
<svg id="wan-spark" class="spark" viewBox="0 0 600 80" preserveAspectRatio="none" aria-hidden="true"></svg>
</section>

<section class="card power" aria-labelledby="h-power">
<h2 id="h-power">Power</h2>
<div class="hero" id="ups-state">—</div>
<div class="kv">
<div>Charge<b id="ups-charge">—</b></div>
<div>Runtime<b id="ups-runtime">—</b></div>
<div>Load<b id="ups-load">—</b></div>
</div>
<!-- One card at a time, whichever matters now (wall.js, CONTEXT). The UPS
that used to have this cell lives in its node tile, mjolnir. -->
<section class="card context" aria-labelledby="h-context">
<h2 id="h-context">—</h2>
<div id="context" class="context-body"></div>
<div id="context-also" class="context-also"></div>
</section>

<section class="card household" aria-labelledby="h-house">
Expand Down
Loading