various tidyups

This commit is contained in:
zorruno
2026-08-15 14:58:19 +12:00
parent c85ab28c10
commit dbb0a6a89c
30 changed files with 2977 additions and 684 deletions
+44
View File
@@ -0,0 +1,44 @@
shell_command:
flounder_refresh_motioneye_snapshots: >-
python3 /config/scripts/flounder_motioneye_snapshots.py
"{{ state_attr('camera.camera2', 'entity_picture') }}"
"{{ state_attr('camera.camera5', 'entity_picture') }}"
"{{ state_attr('camera.camera6', 'entity_picture') }}"
"{{ state_attr('camera.trailer', 'entity_picture') }}"
"{{ state_attr('camera.camera4', 'entity_picture') }}"
flounder_refresh_primary_motioneye_snapshots: >-
python3 /config/scripts/flounder_motioneye_snapshots.py --primary
"{{ state_attr('camera.camera2', 'entity_picture') }}"
"{{ state_attr('camera.camera5', 'entity_picture') }}"
"{{ state_attr('camera.camera6', 'entity_picture') }}"
automation:
- id: flounder_refresh_motioneye_snapshots
alias: "Flounder: Refresh MotionEye snapshots"
description: >-
Sequentially refreshes durable local CCTV previews without loading live
streams in the kiosk browser.
triggers:
- trigger: time_pattern
minutes: "*"
id: tick
- trigger: state
entity_id: binary_sensor.flounder_kiosk_screen_on
from: "off"
to: "on"
id: screen_on
conditions:
- condition: state
entity_id: binary_sensor.flounder_kiosk_screen_on
state: "on"
actions:
- choose:
- conditions:
- condition: template
value_template: >-
{{ trigger.id == 'tick' and now().minute % 5 == 0 }}
sequence:
- action: shell_command.flounder_refresh_motioneye_snapshots
default:
- action: shell_command.flounder_refresh_primary_motioneye_snapshots
mode: single