mirror of
https://github.com/steku/ha_cercadian_alarm.git
synced 2025-12-10 16:42:16 +00:00
Compare commits
32 Commits
2024.09.24
...
20251110-1
| Author | SHA1 | Date | |
|---|---|---|---|
| a47dedcae5 | |||
| 18ebe99a41 | |||
| c04b71095c | |||
| 1be86b7d48 | |||
| d32bb93747 | |||
| c0137387b3 | |||
| 1a63451f87 | |||
| 43c777f75c | |||
| 6c4b80af50 | |||
| cf0ae4043f | |||
| bcef0c5e1a | |||
| 3fe5bef2ba | |||
| 8171597885 | |||
| 9ff1580896 | |||
| 7181024497 | |||
| 7bb03ddf05 | |||
| 1ba56d49fc | |||
| cc19261f50 | |||
| d8665a518f | |||
| 4f10220e5b | |||
| 343b710ab9 | |||
| 2f9adcfac8 | |||
| e91adc42ea | |||
| 938f68ec39 | |||
| 1b34146670 | |||
| 34f66f8ff8 | |||
| 0a6e879aad | |||
| 9682c6c5e8 | |||
| 3e1b33702a | |||
| 78cb28e6a0 | |||
| 59574d5b49 | |||
| ce05c4791c |
@ -1,152 +1,198 @@
|
||||
blueprint:
|
||||
name: Parabolic Alarm Automation
|
||||
description: Turn a light on based on detected motion
|
||||
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: {}
|
||||
conditions:
|
||||
name: Conditions
|
||||
description: Set your own conditions for this automation. All conditions must pass unless you add your own OR block
|
||||
default: []
|
||||
selector:
|
||||
condition:
|
||||
alarm_start_time:
|
||||
name: Start Time
|
||||
description: Datetime helper for alarm to start. Use time only and Workday sensor to determine what days to run.
|
||||
name: 🕒 Start Time
|
||||
description:
|
||||
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
|
||||
workday_sensor:
|
||||
name: Workday Sensor
|
||||
description: Binary Sensor for determining whether it should run. Typically from Workday Integration
|
||||
- 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:
|
||||
entity:
|
||||
filter:
|
||||
- domain: binary_sensor
|
||||
text:
|
||||
alarm_script:
|
||||
name: Script to trigger
|
||||
name: 📄 Script to trigger
|
||||
description: Light Alarm Script
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
- domain: script
|
||||
- domain:
|
||||
- script
|
||||
multiple: false
|
||||
target_light:
|
||||
name: Lights
|
||||
description: The light(s) with kelvin
|
||||
description: A single light or group
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
- domain: light
|
||||
target:
|
||||
entity:
|
||||
domain: light
|
||||
name: Target Light
|
||||
light_timeout:
|
||||
name: Timeout
|
||||
description: Light will turn off after this time on last run
|
||||
name: ⏱️ Timeout
|
||||
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
|
||||
max: 60
|
||||
min: 0.0
|
||||
max: 60.0
|
||||
step: 1.0
|
||||
mode: slider
|
||||
steps_per_minute:
|
||||
name: Steps per minute for all runs
|
||||
description: Used for configuring percentage of each step for brightness and color temperature
|
||||
name: 🏃♂️ Steps per minute for all runs
|
||||
description:
|
||||
Used for configuring percentage of each step for brightness and
|
||||
color temperature
|
||||
default: 12
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 60
|
||||
|
||||
min: 1.0
|
||||
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:
|
||||
color_temp:
|
||||
unit: kelvin
|
||||
default: 2500
|
||||
name: Starting Kelvin
|
||||
name: ☀️ Starting Kelvin
|
||||
target_kelvin_1:
|
||||
description: >-
|
||||
Target Kelvin value (cold) for the end of the first run
|
||||
description: Target Kelvin value (cold) for the end of the first run
|
||||
selector:
|
||||
color_temp:
|
||||
unit: kelvin
|
||||
default: 3000
|
||||
name: Target Kelvin 1
|
||||
name: ☀️ Target Kelvin 1
|
||||
max_brightness_1:
|
||||
name: Maximum Brightness 1
|
||||
name: ⭐️ Maximum Brightness 1
|
||||
description: Finish value for first run
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 100
|
||||
min: 1.0
|
||||
max: 100.0
|
||||
step: 1.0
|
||||
mode: slider
|
||||
default: 10
|
||||
alarm_length_1:
|
||||
name: Alarm Length 1
|
||||
description: >-
|
||||
This is the start to finish time for the first run
|
||||
name: ⏰ Alarm Length 1
|
||||
description: This is the start to finish time for the first run
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 60
|
||||
min: 1.0
|
||||
max: 60.0
|
||||
step: 1.0
|
||||
mode: slider
|
||||
default: 10
|
||||
|
||||
target_kelvin_2:
|
||||
description: >-
|
||||
Target Kelvin value (cold) for second run
|
||||
description: Target Kelvin value (cold) for second run
|
||||
selector:
|
||||
color_temp:
|
||||
unit: kelvin
|
||||
default: 4000
|
||||
name: Target Kelvin 2
|
||||
name: 🌗 Target Kelvin 2
|
||||
max_brightness_2:
|
||||
name: Maximum Brightness 2
|
||||
name: ⭐️ Maximum Brightness 2
|
||||
description: Finish value for second run
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 100
|
||||
min: 1.0
|
||||
max: 100.0
|
||||
step: 1.0
|
||||
mode: slider
|
||||
default: 50
|
||||
alarm_length_2:
|
||||
name: Alarm length 2
|
||||
description: >-
|
||||
This is the start to finish time for the second run
|
||||
name: ⏰ Alarm length 2
|
||||
description: This is the start to finish time for the second run
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 60
|
||||
min: 1.0
|
||||
max: 60.0
|
||||
step: 1.0
|
||||
mode: slider
|
||||
default: 10
|
||||
|
||||
target_kelvin_3:
|
||||
description: >-
|
||||
Target Kelvin value (cold) for third run
|
||||
description: Target Kelvin value (cold) for third run
|
||||
selector:
|
||||
color_temp:
|
||||
unit: kelvin
|
||||
default: 6500
|
||||
name: Target Kelvin 3
|
||||
name: 🌑 Target Kelvin 3
|
||||
max_brightness_3:
|
||||
name: Maximum Brightness 3
|
||||
name: ⭐️ Maximum Brightness 3
|
||||
description: Finish value for third and final run
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 100
|
||||
min: 1.0
|
||||
max: 100.0
|
||||
step: 1.0
|
||||
mode: slider
|
||||
default: 100
|
||||
alarm_length_3:
|
||||
name: Alarm Length 3
|
||||
description: >-
|
||||
This is the start to finish time for the third run
|
||||
name: ⏰ Alarm Length 3
|
||||
description: This is the start to finish time for the third run
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 60
|
||||
min: 1.0
|
||||
max: 60.0
|
||||
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:
|
||||
- platform: time
|
||||
at: !input alarm_start_time
|
||||
|
||||
- trigger: 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: and
|
||||
conditions: !input conditions
|
||||
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
|
||||
@ -159,7 +205,6 @@ action:
|
||||
steps_per_minute: !input steps_per_minute
|
||||
light_timeout: 0
|
||||
target_light: !input target_light
|
||||
|
||||
- if:
|
||||
- condition: state
|
||||
state: "on"
|
||||
@ -175,9 +220,8 @@ action:
|
||||
light_timeout: 0
|
||||
target_light: !input target_light
|
||||
- if:
|
||||
- condition: state
|
||||
state: "on"
|
||||
entity_id: !input target_light
|
||||
- condition: template
|
||||
value_template: "{{ expand(target_light.entity_id) | selectattr('state', '==', 'on') | list | count > 0 }}"
|
||||
then:
|
||||
- action: !input alarm_script
|
||||
data:
|
||||
@ -188,5 +232,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
|
||||
|
||||
@ -112,12 +112,11 @@ sequence:
|
||||
seconds: "{{ individual_step }}"
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ is_state(target_light, 'on') }}"
|
||||
value_template: "{{ not is_state(target_light, 'off') }}"
|
||||
then:
|
||||
- data:
|
||||
brightness: "{{ brightness }}"
|
||||
color_temp_kelvin: "{{ kelvin }}"
|
||||
transition: "{{ individual_step - 1 }}"
|
||||
target:
|
||||
entity_id: "{{ target_light }}"
|
||||
action: light.turn_on
|
||||
@ -127,7 +126,7 @@ sequence:
|
||||
- condition: template
|
||||
value_template: "{{ light_timeout != 0 }}"
|
||||
- condition: template
|
||||
value_template: "{{ is_state(target_light, 'on') }}"
|
||||
value_template: "{{ not is_state(target_light, 'off') }}"
|
||||
then:
|
||||
- delay:
|
||||
minutes: "{{ light_timeout }}"
|
||||
|
||||
Reference in New Issue
Block a user