mirror of
https://github.com/steku/ha_cercadian_alarm.git
synced 2025-12-11 17:12:33 +00:00
Compare commits
16 Commits
2025.03.19
...
conditions
| Author | SHA1 | Date | |
|---|---|---|---|
| d8579d953f | |||
| 7bb03ddf05 | |||
| 1ba56d49fc | |||
| cc19261f50 | |||
| d8665a518f | |||
| 4f10220e5b | |||
| 343b710ab9 | |||
| 2f9adcfac8 | |||
| e91adc42ea | |||
| 938f68ec39 | |||
| 1b34146670 | |||
| 34f66f8ff8 | |||
| 0a6e879aad | |||
| 9682c6c5e8 | |||
| 3e1b33702a | |||
| 78cb28e6a0 |
@ -3,17 +3,31 @@ blueprint:
|
||||
description: Turn a light on based on a start time, whether it is a workday and whether a person is home. This is to match the sunrise and allow for a natural wake up.
|
||||
domain: automation
|
||||
input:
|
||||
pre_action:
|
||||
name: 🎮 Pre Script Action
|
||||
description: An action you want to perform before the lights turn on.
|
||||
default: []
|
||||
selector:
|
||||
action: {}
|
||||
alarm_start_time:
|
||||
name: 🕒 Start Time
|
||||
description:
|
||||
Datetime helper for the alarm to start. Use time only and Workday sensor
|
||||
Datetime helper or sensor for the alarm to start. Use time only and Workday sensor
|
||||
to determine what days to run.
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
- domain:
|
||||
- input_datetime
|
||||
- domain: sensor
|
||||
device_class: timestamp
|
||||
multiple: false
|
||||
offset_from_start_time:
|
||||
name: 🏁 Offset From Start Time
|
||||
description: Adjust the amount of time before or after the set Start Time value to start the transition. Enter seconds or HH:MM:SS format (e.g. "-00:05:00" to start 5 minutes before the Start Time. Useful if the start time comes from an alarm entity and you want to adjust where in the brightness cycle you are when the alarm goes off. See https://www.home-assistant.io/docs/automation/trigger/#sensors-of-datetime-device-class-with-offsets for caution about using positive offsets.
|
||||
default: "-00:00:00"
|
||||
selector:
|
||||
text:
|
||||
workday_sensor:
|
||||
name: 📆 Workday Sensor
|
||||
description:
|
||||
@ -24,7 +38,7 @@ blueprint:
|
||||
filter:
|
||||
- domain:
|
||||
- binary_sensor
|
||||
multiple: false
|
||||
multiple: true
|
||||
person_sensor:
|
||||
name: 👤 Person Sensor
|
||||
description: Select the person sensor so that the alarm will only run when you are home.
|
||||
@ -54,11 +68,11 @@ blueprint:
|
||||
multiple: false
|
||||
light_timeout:
|
||||
name: ⏱️ Timeout
|
||||
description: Light will turn off after this time on last run
|
||||
description: Light will turn off after this time on last run. Setting this to 0 will leave the light on.
|
||||
default: 10
|
||||
selector:
|
||||
number:
|
||||
min: 1.0
|
||||
min: 0.0
|
||||
max: 60.0
|
||||
step: 1.0
|
||||
mode: slider
|
||||
@ -74,6 +88,16 @@ blueprint:
|
||||
max: 60.0
|
||||
step: 1.0
|
||||
mode: slider
|
||||
start_brightness:
|
||||
name: ⭐️ Start Brightness
|
||||
description: Starting value for brightness
|
||||
selector:
|
||||
number:
|
||||
min: 1.0
|
||||
max: 100.0
|
||||
step: 1.0
|
||||
mode: slider
|
||||
default: 1.0
|
||||
start_kelvin_temp:
|
||||
description: Start Kelvin value (warm) for 1st run
|
||||
selector:
|
||||
@ -162,22 +186,37 @@ blueprint:
|
||||
step: 1.0
|
||||
mode: slider
|
||||
default: 5
|
||||
post_action:
|
||||
name: 🎮 Post Script Action
|
||||
description: An action you want to run after the script has finished
|
||||
default: []
|
||||
selector:
|
||||
action: {}
|
||||
source_url: https://github.com/steku/ha_cercadian_alarm/blob/main/parabolic_alarm.yaml
|
||||
trigger:
|
||||
- trigger: time
|
||||
at: !input alarm_start_time
|
||||
at:
|
||||
entity_id: !input alarm_start_time
|
||||
offset: !input offset_from_start_time
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: !input workday_sensor
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: !input person_sensor
|
||||
state: "home"
|
||||
- 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: []
|
||||
sequence: !input pre_action
|
||||
- action: light.turn_on
|
||||
data:
|
||||
color_temp_kelvin: !input start_kelvin_temp
|
||||
brightness_pct: 1
|
||||
brightness_pct: !input start_brightness
|
||||
entity_id: !input target_light
|
||||
- delay:
|
||||
seconds: 5
|
||||
@ -218,5 +257,7 @@ action:
|
||||
steps_per_minute: !input steps_per_minute
|
||||
light_timeout: !input light_timeout
|
||||
target_light: !input target_light
|
||||
mode: parallel
|
||||
max: 10
|
||||
- choose:
|
||||
- conditions: []
|
||||
sequence: !input post_action
|
||||
mode: single
|
||||
|
||||
@ -117,7 +117,6 @@ sequence:
|
||||
- data:
|
||||
brightness: "{{ brightness }}"
|
||||
color_temp_kelvin: "{{ kelvin }}"
|
||||
transition: "{{ individual_step - 1 }}"
|
||||
target:
|
||||
entity_id: "{{ target_light }}"
|
||||
action: light.turn_on
|
||||
|
||||
Reference in New Issue
Block a user