1 Commits

Author SHA1 Message Date
d8579d953f or conditions for schedule and person 2025-04-29 15:40:29 -04:00
2 changed files with 37 additions and 13 deletions

View File

@ -9,12 +9,6 @@ blueprint:
default: []
selector:
action: {}
conditions:
name: Conditions
description: Set your own conditions for this automation. All conditions must pass unles you add your own OR block
default: []
selector:
condition:
alarm_start_time:
name: 🕒 Start Time
description:
@ -34,6 +28,26 @@ blueprint:
default: "-00:00:00"
selector:
text:
workday_sensor:
name: 📆 Workday Sensor
description:
Binary Sensor that is used to determine whether it should run. Typically
from Workday Integration. More information here - https://www.home-assistant.io/integrations/workday/
selector:
entity:
filter:
- domain:
- binary_sensor
multiple: true
person_sensor:
name: 👤 Person Sensor
description: Select the person sensor so that the alarm will only run when you are home.
selector:
entity:
filter:
- domain:
- person
multiple: true
alarm_script:
name: 📄 Script to trigger
description: Light Alarm Script
@ -44,12 +58,14 @@ blueprint:
- script
multiple: false
target_light:
description: A single light or group
name: 💡 Lights
description: The light(s) with kelvin
selector:
entity:
filter:
domain: light
name: Target Light
- domain:
- light
multiple: false
light_timeout:
name: ⏱️ Timeout
description: Light will turn off after this time on last run. Setting this to 0 will leave the light on.
@ -183,8 +199,16 @@ trigger:
entity_id: !input alarm_start_time
offset: !input offset_from_start_time
condition:
condition: and
conditions: !input conditions
- condition: or
conditions:
- condition: state
entity_id: !input workday_sensor
state: "on"
- condition: or
conditions:
- condition: state
entity_id: !input person_sensor
state: "home"
action:
- choose:
- conditions: []

View File

@ -112,7 +112,7 @@ sequence:
seconds: "{{ individual_step }}"
- if:
- condition: template
value_template: "{{ not is_state(target_light, 'off') }}"
value_template: "{{ is_state(target_light, 'on') }}"
then:
- data:
brightness: "{{ brightness }}"
@ -126,7 +126,7 @@ sequence:
- condition: template
value_template: "{{ light_timeout != 0 }}"
- condition: template
value_template: "{{ not is_state(target_light, 'off') }}"
value_template: "{{ is_state(target_light, 'on') }}"
then:
- delay:
minutes: "{{ light_timeout }}"