Files
N22/include/automations/ai_indkorsel.yaml
T
claus ed6e91d52b Ignorer motion-notifikationer når støvsugeren kører
Tilføj condition til AI overvågning og 'der er nogen i indkørslen':
skip notifikation hvis vacuum.roborock_s8_pro_ultra er cleaning/returning
2026-04-19 14:18:27 +02:00

24 lines
760 B
YAML

- alias: 'AI overvågning'
trigger:
platform: state
entity_id: binary_sensor.indkorsel_sensor_motion
to: 'on'
conditions:
- condition: template
value_template: >-
{% set last = state_attr('automation.ai_overvagning', 'last_triggered') %}
{% set someone_home = is_state('binary_sensor.family_presence', 'on') %}
{{ not someone_home or last is none or (now() - last).total_seconds() > 900 }}
- condition: not
conditions:
- condition: state
entity_id: vacuum.roborock_s8_pro_ultra
state:
- cleaning
- returning
actions:
- action: script.overvaagning
metadata: {}
data: {}
mode: single