feat: Home Assistant integration — live status + auto-sync print slots
Deploy via Portainer / deploy (push) Successful in 0s

This commit is contained in:
Jo
2026-07-07 11:40:52 +02:00
parent 4206a8934e
commit 5686706a4e
5 changed files with 281 additions and 6 deletions
+14 -1
View File
@@ -15,7 +15,7 @@
<div class="card-body p-0">
<table class="table table-hover mb-0">
<thead class="table-light">
<tr><th>Nom</th><th>Statut</th><th>Notes</th><th></th></tr>
<tr><th>Nom</th><th>Statut</th><th>Préfixe HA</th><th>Notes</th><th></th></tr>
</thead>
<tbody>
{% for p in printers %}
@@ -28,6 +28,13 @@
<span class="badge bg-secondary">Inactive</span>
{% endif %}
</td>
<td>
{% if p.ha_entity_prefix %}
<code class="small text-primary">{{ p.ha_entity_prefix }}</code>
{% else %}
<span class="text-muted small"></span>
{% endif %}
</td>
<td class="text-muted small">{{ p.notes or '—' }}</td>
<td>
<div class="d-flex gap-1">
@@ -59,6 +66,12 @@
<label class="form-label fw-semibold">Nom</label>
<input type="text" name="name" class="form-control" required placeholder="ex: A1 #7, X1C #1">
</div>
<div class="mb-3">
<label class="form-label fw-semibold">Préfixe entité Home Assistant <span class="text-muted fw-normal small">(optionnel)</span></label>
<input type="text" name="ha_entity_prefix" class="form-control font-monospace"
placeholder="ex : patabambulab01">
<div class="form-text">Préfixe HA pour la synchro automatique du planning. Configurer l'URL HA dans <a href="{{ url_for('settings') }}">Paramètres</a>.</div>
</div>
<div class="mb-3">
<label class="form-label fw-semibold">Notes</label>
<input type="text" name="notes" class="form-control" placeholder="couleur, emplacement…">