{# plugins/homeassistant/templates/homeassistant/index.html — whether Home Assistant answers, which updates are waiting with Install beside each, how its backups stand, and the updates Steward has run. Refreshes itself while one is under way. #} {% extends "base.html" %} {% from "_macros.html" import page_header, status_badge, stat_tile, empty_state %} {% block title %}Home Assistant — Steward{% endblock %} {% block content %} {% set admin = session.user_role == 'admin' %} {% call page_header("Home Assistant", connection.url if connection else none) %} {% if admin and connection %}Connection{% endif %} {% endcall %} {% if not connection %} {% if error %}
{{ error }}
{% endif %}{{ error }}
{% endif %}{% if under_way %}{{ status_badge('pending', 'Updating') }} {{ under_way.title }}: {{ "taking a backup first" if under_way.state == 'backing_up' else "installing " ~ under_way.to_version }}. Home Assistant may stop answering for a while. {% elif reach == 'up' %}{{ status_badge('up', 'Answering') }} {% if installable %}{{ installable|length }} update{{ "s" if installable|length != 1 }} waiting.{% else %}Everything Steward can update is up to date.{% endif %} Read {{ connection.last_polled_at|ago }}. {% elif reach == 'down' %}{{ status_badge('down', 'Not answering') }} {{ says }} {% if connection.last_ok_at %}Last answered {{ connection.last_ok_at|ago }}; what's below is from then.{% endif %} {% if admin and connection.refused %}
{% endif %} {% else %}{{ status_badge('pending', 'Not read yet') }} {{ says }}{% endif %} {% if not connection.can_install %}The Home Assistant user who signed in isn't an administrator, so updates can't be installed from here. {% if admin %}Sign in again as an administrator to install them.{% endif %}
{% endif %}{{ backup_says }}
| What | Now | New | {% if admin %}{% endif %} |
|---|---|---|---|
| {{ u.title }} {{ u.kind_word }}{% if u.auto_update %}, updates itself{% endif %} |
{{ u.installed or "—" }} | {% if u.release_url %}{{ u.latest or "—" }}{% else %}{{ u.latest or "—" }}{% endif %} | {% if admin %}{% if connection.can_install and not under_way and not connection.refused and not u.in_progress %} {% endif %} | {% endif %}
Nothing waiting.
{% endif %} {% if current %}Up to date: {% for u in current %}{{ u.title }} {{ u.installed }}{{ ", " if not loop.last }}{% endfor %}.
{% endif %} {% if others %}Waiting, for Home Assistant to install: {% for u in others %}{{ u.title }}{{ ", " if not loop.last }}{% endfor %}. Steward installs Core, OS and add-on updates only.
{% endif %}| What | Versions | Outcome | Started |
|---|---|---|---|
| {{ r.title }} by {{ r.started_by or "Steward" }} |
{{ r.from_version or "—" }} → {{ r.to_version or "—" }} | {% if r.state == 'done' %}{{ status_badge('up', 'Done') }}
{% elif r.state == 'failed' %}{{ status_badge('down', 'Failed') }} {{ r.message }}
{% else %}{{ status_badge('pending', 'Taking a backup' if r.state == 'backing_up' else 'Installing') }}{% endif %} |
{{ r.started_at|ago }} |