diff --git a/README.md b/README.md
index dc15eea..7661732 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,8 @@ A small web page to adjust the heating per room from a phone on the home network
+The page can be added to the phone's home screen with its own icon: "Share → Add to Home Screen" in Safari, "Add to home screen" in Chrome. On iPhone it then opens full-screen. Android Chrome only installs a page as an app over HTTPS, so over plain HTTP it adds a shortcut, which may open as a normal browser tab. The page has no service worker and caches nothing, so it always shows the live state and only works on the home network. Offline use or notifications would need HTTPS too. The icons are drawn by `internal/web/icon.go`: change it and run `go generate ./...`.
+
## Airing
"Air 5/15/30/60" sends `system_mode: off` for that many minutes, with 5 for a quick Stoßlüften. When the time is up, or on "Heat again", the room gets back the mode and target from before.
diff --git a/internal/web/icon.go b/internal/web/icon.go
new file mode 100644
index 0000000..38be98d
--- /dev/null
+++ b/internal/web/icon.go
@@ -0,0 +1,100 @@
+//go:build ignore
+
+// Draws the home screen icons into static/: a white thermometer on the page's
+// accent colour. The square is filled to the edge, and the thermometer stays
+// inside the middle circle that Android keeps when it masks an icon.
+// Run with go generate ./internal/web.
+package main
+
+import (
+ "image"
+ "image/color"
+ "image/png"
+ "log"
+ "math"
+ "os"
+ "path/filepath"
+)
+
+var (
+ accent = color.NRGBA{0xb4, 0x49, 0x0f, 0xff}
+ white = color.NRGBA{0xff, 0xff, 0xff, 0xff}
+)
+
+// A thermometer in a unit square: a round-topped stem down into a bulb.
+type thermometer struct {
+ stem, bulb, top float64
+}
+
+// inside reports whether (x, y) is inside the thermometer.
+func (t thermometer) inside(x, y float64) bool {
+ const cx, bulbY = 0.5, 0.655
+ if math.Hypot(x-cx, y-bulbY) <= t.bulb {
+ return true
+ }
+ half := t.stem / 2
+ if y >= t.top && y <= bulbY && math.Abs(x-cx) <= half {
+ return true
+ }
+ return math.Hypot(x-cx, y-t.top) <= half
+}
+
+var (
+ outline = thermometer{stem: 0.13, bulb: 0.15, top: 0.26}
+ glass = thermometer{stem: 0.07, bulb: 0.12, top: 0.26}
+ mercury = thermometer{stem: 0.03, bulb: 0.08, top: 0.42}
+)
+
+func colorAt(x, y float64) color.NRGBA {
+ switch {
+ case mercury.inside(x, y):
+ return white
+ case glass.inside(x, y):
+ return accent
+ case outline.inside(x, y):
+ return white
+ default:
+ return accent
+ }
+}
+
+func draw(size int) *image.NRGBA {
+ const samples = 4
+ img := image.NewNRGBA(image.Rect(0, 0, size, size))
+ for py := range size {
+ for px := range size {
+ var r, g, b float64
+ for sy := range samples {
+ for sx := range samples {
+ x := (float64(px) + (float64(sx)+0.5)/samples) / float64(size)
+ y := (float64(py) + (float64(sy)+0.5)/samples) / float64(size)
+ c := colorAt(x, y)
+ r, g, b = r+float64(c.R), g+float64(c.G), b+float64(c.B)
+ }
+ }
+ n := float64(samples * samples)
+ img.SetNRGBA(px, py, color.NRGBA{uint8(math.Round(r / n)), uint8(math.Round(g / n)), uint8(math.Round(b / n)), 0xff})
+ }
+ }
+ return img
+}
+
+func main() {
+ for name, size := range map[string]int{
+ "icon-192.png": 192,
+ "icon-512.png": 512,
+ "apple-touch-icon.png": 180,
+ } {
+ f, err := os.Create(filepath.Join("static", name))
+ if err != nil {
+ log.Fatal(err)
+ }
+ enc := png.Encoder{CompressionLevel: png.BestCompression}
+ if err := enc.Encode(f, draw(size)); err != nil {
+ log.Fatal(err)
+ }
+ if err := f.Close(); err != nil {
+ log.Fatal(err)
+ }
+ }
+}
diff --git a/internal/web/static/apple-touch-icon.png b/internal/web/static/apple-touch-icon.png
new file mode 100644
index 0000000..3042247
Binary files /dev/null and b/internal/web/static/apple-touch-icon.png differ
diff --git a/internal/web/static/icon-192.png b/internal/web/static/icon-192.png
new file mode 100644
index 0000000..f9ef6f0
Binary files /dev/null and b/internal/web/static/icon-192.png differ
diff --git a/internal/web/static/icon-512.png b/internal/web/static/icon-512.png
new file mode 100644
index 0000000..d7b52f9
Binary files /dev/null and b/internal/web/static/icon-512.png differ
diff --git a/internal/web/static/index.html b/internal/web/static/index.html
index 1aade80..59bd2c4 100644
--- a/internal/web/static/index.html
+++ b/internal/web/static/index.html
@@ -7,6 +7,13 @@
+
+
+
+
+
+