Hallo,
anbei mal eine Automation wo es mir nur darum geht nach Start der Automation mit einem input_boolean nur fortzufahren wenn eine gewisse Zeit lang der input_boolean aktiv war.
Evtl. kann mir jemand helfen.
Szenarium:
Ich aktiviere mit dem input_boolean eine Automation (Alarmanlage) , vergesse etwas zuhause und muss wieder ins Haus. Da ich aber nicht jedesmal die Automation wieder neustarten möchte, also AN / AUS → und wieder AN, (Duty Cicle und Rollläden hoch und runter) möchte ich das die Automation nach einer gewissen Zeit erst anläuft und prüft ob der input_boolean noch an ist.
War das verständlich ?
Es geht nur um den Teil der “Sobald “ und “Und wenn” Kreterien
Hier der Yaml Code.
Grüße Daniel
alias: Switch ON -> Alarmanlage Tag ON -> Automation
description: ""
triggers:
- trigger: state
entity_id:
- input_boolean.alarmanlage_tag_switch_on_off
to: "on"
from: "off"
enabled: true
conditions: []
actions:
- choose:
- conditions:
- alias: >-
Wenn 2 Bedingungen erfüllt sind -> Tür / Fenstersensoren +
Haustürsensor sind alle geschlossen
condition: and
conditions:
- condition: state
entity_id: binary_sensor.fenster_tursensoren_erdgeschoss
state: "off"
- condition: state
entity_id: binary_sensor.turkontakt_haustur
state: "off"
- condition: state
entity_id: automation.alarmanlage_nacht_on_sv
state: "on"
sequence:
- type: turn_off
device_id: 9760c02e7b67343f369a135754c89e03
entity_id: b4efb453901b25a973c01c04a6f359b6
domain: switch
- action: scene.create
metadata: {}
data:
snapshot_entities:
- light.phillips_hue_econic_haustur_rechts
scene_id: hue_temp_light
- alias: " Leuchte: Einschalten auf Phillips HUE Econic Haustür rechts -> GRÜN"
action: light.turn_on
metadata: {}
data:
rgb_color:
- 0
- 250
- 0
brightness_pct: 100
target:
device_id: f2b2a0b3254f056a8cfe81ec2d223432
enabled: true
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
enabled: true
- action: scene.turn_on
metadata: {}
target:
entity_id: scene.hue_temp_light
data: {}
- action: light.turn_off
metadata: {}
data: {}
target:
label_id:
- alle_dimmer_ausser_hue
- govee_leuchten_wohnen_essen
- alle_leuchten_ausser_phillips_hue
- leuchten_phillips_hue_alle
- phillips_hue_terrasse_mauerleuchten
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id:
- switch.sonos_gaste_wc
- switch.sonos_kuche
- switch.badezimmer_sonos
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id:
- input_boolean.sonnenschutz
- input_boolean.hitzeschutz_switch_on_off
- input_boolean.frostschutz_switch_on_off
- action: switch.turn_off
metadata: {}
data: {}
target:
label_id: alle_leuchten_ausser_phillips_hue
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- action: switch.turn_on
metadata: {}
data: {}
target:
label_id: kameras_innen
- action: scene.delete
metadata: {}
data: {}
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.anwesenheit_simulieren
- conditions:
- alias: " irgendeine von 2 Bedingungen erfüllt ist. -> Wenn entweder Tür / Fesntersensoren ODER Haustürsensor noch offen sind"
condition: or
conditions:
- condition: state
entity_id: binary_sensor.fenster_tursensoren_erdgeschoss
state: "on"
- condition: state
entity_id: binary_sensor.turkontakt_haustur
state: "on"
sequence:
- action: scene.create
metadata: {}
data:
snapshot_entities:
- light.phillips_hue_econic_haustur_rechts
scene_id: hue_temp_light
- alias: " Leuchte: Einschalten auf Phillips HUE Econic Haustür rechts -> ROT"
action: light.turn_on
metadata: {}
data:
rgb_color:
- 255
- 0
- 0
brightness_pct: 100
target:
device_id: f2b2a0b3254f056a8cfe81ec2d223432
enabled: true
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
enabled: true
- action: scene.turn_on
metadata: {}
target:
entity_id: scene.hue_temp_light
data: {}
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.alarmanlage_tag_switch_on_off
mode: single