Migrate AI driveway surveillance to AI Task
This commit is contained in:
@@ -2,7 +2,13 @@
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.indkorsel_sensor_motion
|
||||
to: 'on'
|
||||
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 }}
|
||||
actions:
|
||||
- action: script.overvaagning
|
||||
metadata: {}
|
||||
|
||||
Reference in New Issue
Block a user