---
title: epaper restanzeige
date: "2026-03-19T22:25:00+01:00"
url: "https://wirres.net/articles/epaper-restanzeige"
tags: [automatische wohnung, epaper display, widgets, restzeiten]
category: artikel
additional_categories: [wirres.net]
author: felix schwenzel
---

# epaper restanzeige

beim anschauen [dieses videos](https://www.youtube.com/watch?v=D4QyStJWgCc) habe ich folgendes widget gesehen.

![screenshot von marques brownlee review des „Nothing Phone 4A/Pro“. es zeigt ein widget das die prozentualen restzeiten des aktuellen tages, der woche, des monats und des jahres anzeigt.](https://wirres.net/media/pages/articles/epaper-restanzeige/6eda525c2f-1773954940/bildschirmfoto-2026-03-19-um-20.59.26-640x.png)

sowas wollte ich auch haben. zunächst habe ich mir von cursor ein markdown-widget für *home assistant* bauen lassen. das sah dann so aus.

![markdown-wodget in meinem home assistant dashboard. es zeigt die prozentualen restzeiten des aktuellen tages, der woche, des monats, des jahres und meines lebens.](https://wirres.net/media/pages/articles/epaper-restanzeige/76fb1a4824-1773955084/bildschirmfoto-2026-03-19-um-22.17.53-640x.png)

die zeile mit dem leben nehm ich möglicherweise wieder raus weil sie zu frustruierend ist. ich habe *cursor* mein geburtsdatum verraten und gehe für die statistik davon aus, dass ich 90 jahre alt werde. davon sind bald zwei drittel rum.

der code ist relativ überschaubar:

```
{% set dots = 28 %}
{% set mins_now = now().hour * 60 + now().minute %} {% set day_p = (mins_now / 1440 * 100) %} {% set week_p = (((now().weekday() * 1440) + mins_now) / (7 * 1440) * 100) %}
{% set next_month = (now().replace(day=28) + timedelta(days=4)).replace(day=1) %} {% set month_total = (next_month - timedelta(days=1)).day %} {% set month_p = (((now().day - 1) * 1440 + mins_now) / (month_total * 1440) * 100) %}
{% set year_total = 366 if now().year % 4 == 0 and (now().year % 100 != 0 or now().year % 400 == 0) else 365 %} {% set year_p = (((now().timetuple().tm_yday - 1) * 1440 + mins_now) / (year_total * 1440) * 100) %}
{% set life_start = as_timestamp('1969-03-16 00:00:00') %} {% set life_end = as_timestamp('2059-03-16 00:00:00') %} {% set life_now = as_timestamp(now()) %} {% set life_p_raw = ((life_now - life_start) / (life_end - life_start) * 100) %} {% set life_p = [0, [life_p_raw, 100] | min] | max %}
{% set weekdays = ['MONTAG','DIENSTAG','MITTWOCH','DONNERSTAG','FREITAG','SAMSTAG','SONNTAG'] %} {% set months = ['JANUAR','FEBRUAR','MÄRZ','APRIL','MAI','JUNI','JULI','AUGUST','SEPTEMBER','OKTOBER','NOVEMBER','DEZEMBER'] %}
{% set day_label = weekdays[now().weekday()] %} {% set week_label = 'WOCHE ' ~ now().isocalendar().week %} {% set month_label = months[now().month - 1] %}
{%- macro bar(p, dots) -%} {%- set f = ((p / 100) * dots) | round(0, 'floor') | int -%} {{- ('●' * f) ~ ('·' * (dots - f)) -}} {%- endmacro -%}
<pre class="ntg">{{ '%-10s'|format(day_label) }} {{ bar(day_p, dots) }} {{ '%3d'|format(day_p|round(0)|int) }}%
{{ '%-10s'|format(week_label) }} {{ bar(week_p, dots) }} {{ '%3d'|format(week_p|round(0)|int) }}%
{{ '%-10s'|format(month_label) }} {{ bar(month_p, dots) }} {{ '%3d'|format(month_p|round(0)|int) }}%
{{ '%-10s'|format(now().year|string) }} {{ bar(year_p, dots) }} {{ '%3d'|format(year_p|round(0)|int) }}%
{{ '%-10s'|format('LEBEN') }} {{ bar(life_p, dots) }} {{ '%3d'|format(life_p|round(0)|int) }}%</pre>
```

aber dann fiel mir ein, dass ich noch einen [epaper tag](https://wirres.net/articles/epaper-tags-2) übrig habe, für den ich keine besonders gute verwendung habe. im flur und kinderzimmer hängen tags die nützlich sind und das datum und das wetter anzeigen. der im flur hängt über einem ipad, das bereits das wetter und datum anzeigt. jetzt zeigt es die restzeiten des tages, der woche, des monats und des jahres an. find ich gut.

![screenshot aus meinem home assistant dashbord. er zeigt die bilschirminhalte meiner drei epaper tags](https://wirres.net/media/pages/articles/epaper-restanzeige/91ff1b6da4-1773955483/bildschirmfoto-2026-03-19-um-22.13.34-640x.png)
