diff --git a/dashboards/views/06c_indkorsel_snapshots.yaml b/dashboards/views/06c_indkorsel_snapshots.yaml
index 0116c17..05d4a7f 100644
--- a/dashboards/views/06c_indkorsel_snapshots.yaml
+++ b/dashboards/views/06c_indkorsel_snapshots.yaml
@@ -5,5 +5,5 @@ panel: true
cards:
- type: iframe
- url: /local/snapshots/indkorsel_loader.html?v=20260516130000
+ url: /local/snapshots/indkorsel_loader.html?v=20260516103510
aspect_ratio: 100%
diff --git a/include/automations/snapshots_indkorsel.yaml b/include/automations/snapshots_indkorsel.yaml
index 4f10070..2be5e8a 100644
--- a/include/automations/snapshots_indkorsel.yaml
+++ b/include/automations/snapshots_indkorsel.yaml
@@ -1,3 +1,16 @@
+- alias: 'Indkorsel: Slet gamle snapshots (behold 100)'
+ description: Køres via webhook fra galleriet – sletter alle undtagen de 100 nyeste snapshots og regenererer galleriet.
+ trigger:
+ - platform: webhook
+ webhook_id: indkorsel_prune_100
+ allowed_methods: [POST]
+ local_only: true
+ action:
+ - action: shell_command.indkorsel_prune_keep_100
+ - delay: '00:00:02'
+ - action: shell_command.indkorsel_generate_gallery
+ mode: single
+
- alias: 'Snapshot ved person i indkorsel'
description: >
Gemmer et tidsstemplet snapshot + opdaterer latest.jpg + regenererer HTML-galleri,
diff --git a/include/shell_commands/indkorsel.yaml b/include/shell_commands/indkorsel.yaml
index 188f8e4..9d993cd 100644
--- a/include/shell_commands/indkorsel.yaml
+++ b/include/shell_commands/indkorsel.yaml
@@ -1 +1,2 @@
indkorsel_generate_gallery: "/usr/local/bin/docker exec homeassistant python3 /config/python_scripts/generate_indkorsel_gallery.py"
+indkorsel_prune_keep_100: "ls -1 /config/www/snapshots/indkorsel/*.jpg | grep -v '/latest.jpg$' | sort -r | tail -n +101 | xargs rm -f"
diff --git a/python_scripts/generate_indkorsel_gallery.py b/python_scripts/generate_indkorsel_gallery.py
index 7ef670e..ae1bc6d 100644
--- a/python_scripts/generate_indkorsel_gallery.py
+++ b/python_scripts/generate_indkorsel_gallery.py
@@ -56,6 +56,9 @@ html = f"""
- Viser {len(files)} person-snapshots – Indkorsel
+ Viser {len(files)} person-snapshots – Indkorsel
+
+
{"" + items_html + "
" if files else "Ingen snapshots endnu.
"}
Nye billeder – tryk for at opdatere
@@ -124,6 +129,21 @@ html = f"""
document.getElementById('modal').addEventListener('click', function(e){{
if(e.target === this) closeModal();
}});
+ function pruneSnapshots(){{
+ if(!confirm('Slet alle undtagen de 100 nyeste billeder?')) return;
+ const btn = document.getElementById('pruneBtn');
+ btn.disabled = true;
+ btn.textContent = 'Sletter...';
+ fetch('/api/webhook/indkorsel_prune_100', {{method:'POST'}})
+ .then(() => {{
+ btn.textContent = 'Færdig – genindlæser...';
+ setTimeout(() => window.location.reload(true), 3500);
+ }})
+ .catch(() => {{
+ btn.disabled = false;
+ btn.textContent = 'Fejl – prøv igen';
+ }});
+ }}
// Tjek hvert 60 sek om der er en nyere version af galleriet
setInterval(() => {{
fetch('/local/snapshots/indkorsel_loader.html?_=' + Date.now())
diff --git a/www/snapshots/indkorsel/2026-05-16_10-33-52.jpg b/www/snapshots/indkorsel/2026-05-16_10-33-52.jpg
new file mode 100644
index 0000000..11a9ea1
Binary files /dev/null and b/www/snapshots/indkorsel/2026-05-16_10-33-52.jpg differ
diff --git a/www/snapshots/indkorsel/latest.jpg b/www/snapshots/indkorsel/latest.jpg
index 02a11c3..272bc69 100644
Binary files a/www/snapshots/indkorsel/latest.jpg and b/www/snapshots/indkorsel/latest.jpg differ
diff --git a/www/snapshots/indkorsel_gallery.html b/www/snapshots/indkorsel_gallery.html
index a30dd4c..ccaf4a2 100644
--- a/www/snapshots/indkorsel_gallery.html
+++ b/www/snapshots/indkorsel_gallery.html
@@ -7,6 +7,9 @@
-
Viser 193 person-snapshots – Indkorsel
+
Viser 194 person-snapshots – Indkorsel
+
+
+

+
16. May 2026 10:33:52
+
+
16. May 2026 10:13:43
-
+
16. May 2026 09:22:30
-
+
16. May 2026 09:17:12
-
+
16. May 2026 08:51:11
-
+
16. May 2026 08:38:30
-
+
16. May 2026 08:25:57
-
+
16. May 2026 08:22:46
-
+
16. May 2026 08:16:26
-
+
16. May 2026 08:15:14
-
+
16. May 2026 07:59:47
-
+
16. May 2026 07:58:28
-
+
16. May 2026 07:39:40
-
+
16. May 2026 07:07:20
-
+
16. May 2026 06:30:29
-
+
16. May 2026 06:29:12
-
+
16. May 2026 06:25:51
-
+
16. May 2026 06:24:21
-
+
16. May 2026 06:22:06
-
+
16. May 2026 06:21:51
-
+
15. May 2026 23:04:29
-
+
15. May 2026 21:15:42
-
+
15. May 2026 21:13:16
-
+
15. May 2026 21:12:39
-
+
15. May 2026 20:31:28
-
+
15. May 2026 20:18:37
-
+
15. May 2026 20:16:46
-
+
15. May 2026 20:12:23
-
+
15. May 2026 20:09:58
-
+
15. May 2026 19:53:01
-
+
15. May 2026 18:59:18
-
+
15. May 2026 18:51:39
-
+
15. May 2026 18:51:33
-
+
15. May 2026 18:39:24
-
+
15. May 2026 18:39:05
-
+
15. May 2026 18:38:46
-
+
15. May 2026 18:37:23
-
+
15. May 2026 17:59:55
-
+
15. May 2026 17:58:08
-
+
15. May 2026 17:56:46
-
+
15. May 2026 17:48:12
-
+
15. May 2026 17:45:49
-
+
15. May 2026 17:44:39
-
+
15. May 2026 17:43:33
-
+
15. May 2026 17:42:05
-
+
15. May 2026 17:36:29
-
+
15. May 2026 17:35:59
-
+
15. May 2026 17:34:04
-
+
15. May 2026 17:33:37
-
+
15. May 2026 17:20:46
-
+
15. May 2026 17:05:50
-
+
15. May 2026 17:02:15
-
+
15. May 2026 16:58:25
-
+
15. May 2026 16:58:14
-
+
15. May 2026 16:57:56
-
+
15. May 2026 16:54:38
-
+
15. May 2026 16:52:09
-
+
15. May 2026 16:51:49
-
+
15. May 2026 16:51:20
-
+
15. May 2026 16:50:58
-
+
15. May 2026 16:50:43
-
+
15. May 2026 16:48:28
-
+
15. May 2026 16:44:28
-
+
15. May 2026 16:41:48
-
+
15. May 2026 16:41:21
-
+
15. May 2026 16:40:03
-
+
15. May 2026 16:31:25
-
+
15. May 2026 16:14:05
-
+
15. May 2026 16:12:10
-
+
15. May 2026 16:06:58
-
+
15. May 2026 16:06:27
-
+
15. May 2026 16:04:59
-
+
15. May 2026 16:04:33
-
+
15. May 2026 15:57:22
-
+
15. May 2026 15:53:45
-
+
15. May 2026 15:53:14
-
+
15. May 2026 15:53:03
-
+
15. May 2026 15:47:05
-
+
15. May 2026 15:40:18
-
+
15. May 2026 15:40:11
-
+
15. May 2026 15:39:31
-
+
15. May 2026 15:25:33
-
+
15. May 2026 15:25:02
-
+
15. May 2026 15:24:44
-
+
15. May 2026 15:02:56
-
+
15. May 2026 15:01:56
-
+
15. May 2026 15:01:44
-
+
15. May 2026 15:00:38
-
+
15. May 2026 15:00:08
-
+
15. May 2026 14:59:01
-
+
15. May 2026 14:54:30
-
+
15. May 2026 14:52:35
-
+
15. May 2026 14:44:58
-
+
15. May 2026 14:44:35
-
+
15. May 2026 14:34:48
-
+
15. May 2026 14:34:26
-
+
15. May 2026 14:33:47
-
+
15. May 2026 14:33:26
-
+
15. May 2026 14:33:01
-
+
15. May 2026 14:32:21
-
+
15. May 2026 14:31:58
-
+
15. May 2026 14:31:31
-
+
15. May 2026 14:30:35
-
+
15. May 2026 14:30:16
-
+
15. May 2026 14:30:09
-
+
15. May 2026 14:29:47
-
+
15. May 2026 14:29:12
-
+
15. May 2026 14:28:51
-
+
15. May 2026 14:09:57
-
+
15. May 2026 13:38:39
-
+
15. May 2026 13:30:03
-
+
15. May 2026 13:29:55
-
+
15. May 2026 13:21:46
-
+
15. May 2026 13:09:07
-
+
15. May 2026 13:08:42
-
+
15. May 2026 13:07:51
-
+
15. May 2026 13:07:38
-
+
15. May 2026 13:07:17
-
+
15. May 2026 13:05:44
-
+
15. May 2026 13:05:33
-
+
15. May 2026 13:05:15
-
+
15. May 2026 13:04:51
-
+
15. May 2026 13:02:38
-
+
15. May 2026 12:58:45
-
+
15. May 2026 12:54:42
-
+
15. May 2026 12:50:03
-
+
15. May 2026 12:47:20
-
+
15. May 2026 12:19:54
-
+
15. May 2026 12:18:34
-
+
15. May 2026 12:18:19
-
+
15. May 2026 11:34:52
-
+
15. May 2026 11:32:33
-
+
15. May 2026 11:32:13
-
+
15. May 2026 11:07:05
-
+
15. May 2026 11:05:54
-
+
15. May 2026 11:02:06
-
+
15. May 2026 11:01:52
-
+
15. May 2026 10:27:29
-
+
15. May 2026 10:22:02
-
+
15. May 2026 10:19:01
-
+
15. May 2026 10:16:59
-
+
15. May 2026 10:14:19
-
+
15. May 2026 10:14:08
-
+
15. May 2026 10:13:50
-
+
15. May 2026 10:05:00
-
+
15. May 2026 08:49:04
-
+
15. May 2026 08:44:00
-
+
15. May 2026 08:27:47
-
+
15. May 2026 08:22:34
-
+
15. May 2026 08:22:09
-
+
15. May 2026 07:11:54
-
+
15. May 2026 06:08:05
-
+
14. May 2026 20:49:05
-
+
14. May 2026 20:02:22
-
+
14. May 2026 20:01:14
-
+
14. May 2026 19:45:11
-
+
14. May 2026 19:34:08
-
+
14. May 2026 19:21:55
-
+
14. May 2026 19:18:39
-
+
14. May 2026 18:57:59
-
+
14. May 2026 18:19:41
-
+
14. May 2026 18:19:27
-
+
14. May 2026 18:19:08
-
+
14. May 2026 17:56:42
-
+
14. May 2026 17:32:45
-
+
14. May 2026 17:15:36
-
+
14. May 2026 17:14:21
-
+
14. May 2026 17:10:15
-
+
14. May 2026 16:55:05
-
+
14. May 2026 16:50:06
-
+
14. May 2026 16:37:57
-
+
14. May 2026 16:29:44
-
+
14. May 2026 16:23:46
-
+
14. May 2026 16:09:55
-
+
14. May 2026 16:09:17
-
+
14. May 2026 16:07:40
-
+
14. May 2026 16:07:31
-
+
14. May 2026 16:01:08
-
+
14. May 2026 16:00:57
-
+
14. May 2026 16:00:44
-
+
14. May 2026 16:00:35
-
+
14. May 2026 16:00:23
-
+
14. May 2026 15:59:58
-
+
14. May 2026 15:59:15
-
+
14. May 2026 15:45:04
-
+
14. May 2026 14:58:44
-
+
14. May 2026 14:48:19
-
+
14. May 2026 14:39:44
-
+
14. May 2026 14:34:18
-
+
14. May 2026 14:30:08
-
+
14. May 2026 14:27:55
-
+
14. May 2026 14:26:38
-
+
14. May 2026 14:19:11
-
+
14. May 2026 14:07:19
@@ -814,8 +823,8 @@