mirror of
https://github.com/steku/ha_cercadian_alarm.git
synced 2025-12-18 12:29:32 +00:00
Fixed If statements missing
Fixed if statements that were missing in the automation file, added version number of 1.1.0 as per feedback from community.
This commit is contained in:
@ -1,9 +1,7 @@
|
|||||||
blueprint:
|
blueprint:
|
||||||
name: Parabolic Alarm Automation
|
name: Parabolic Alarm Automation
|
||||||
description:
|
version: 1.1.0
|
||||||
Turn a light on based on a start time, whether it is a workday and
|
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.
|
||||||
whether a person is home. This is to match the sunrise and allow for a natural
|
|
||||||
wake-up.
|
|
||||||
domain: automation
|
domain: automation
|
||||||
input:
|
input:
|
||||||
alarm_start_time:
|
alarm_start_time:
|
||||||
@ -31,7 +29,6 @@ blueprint:
|
|||||||
person_sensor:
|
person_sensor:
|
||||||
name: 👤 Person Sensor
|
name: 👤 Person Sensor
|
||||||
description: Select the person sensor so that the alarm will only run when you are home.
|
description: Select the person sensor so that the alarm will only run when you are home.
|
||||||
default: []
|
|
||||||
selector:
|
selector:
|
||||||
entity:
|
entity:
|
||||||
filter:
|
filter:
|
||||||
@ -45,7 +42,7 @@ blueprint:
|
|||||||
selector:
|
selector:
|
||||||
action: {}
|
action: {}
|
||||||
alarm_script:
|
alarm_script:
|
||||||
name: "\U0001F4C4 Script to trigger"
|
name: 📄 Script to trigger
|
||||||
description: Light Alarm Script
|
description: Light Alarm Script
|
||||||
selector:
|
selector:
|
||||||
entity:
|
entity:
|
||||||
@ -54,7 +51,7 @@ blueprint:
|
|||||||
- script
|
- script
|
||||||
multiple: false
|
multiple: false
|
||||||
target_light:
|
target_light:
|
||||||
name: "\U0001F4A1 Lights"
|
name: 💡 Lights
|
||||||
description: The light(s) with kelvin
|
description: The light(s) with kelvin
|
||||||
selector:
|
selector:
|
||||||
entity:
|
entity:
|
||||||
@ -63,7 +60,7 @@ blueprint:
|
|||||||
- light
|
- light
|
||||||
multiple: false
|
multiple: false
|
||||||
light_timeout:
|
light_timeout:
|
||||||
name: "⏱️ 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
|
||||||
default: 10
|
default: 10
|
||||||
selector:
|
selector:
|
||||||
@ -96,34 +93,34 @@ blueprint:
|
|||||||
color_temp:
|
color_temp:
|
||||||
unit: kelvin
|
unit: kelvin
|
||||||
default: 2500
|
default: 2500
|
||||||
name: "☀️ Starting Kelvin"
|
name: ☀️ Starting Kelvin
|
||||||
target_kelvin_1:
|
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:
|
selector:
|
||||||
color_temp:
|
color_temp:
|
||||||
unit: kelvin
|
unit: kelvin
|
||||||
default: 3000
|
default: 3000
|
||||||
name: "☀️ Target Kelvin 1"
|
name: ☀️ Target Kelvin 1
|
||||||
max_brightness_1:
|
max_brightness_1:
|
||||||
name: "⭐️ Maximum Brightness 1"
|
name: ⭐️ Maximum Brightness 1
|
||||||
description: Finish value for first run
|
description: Finish value for first run
|
||||||
default: 10
|
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
min: 1.0
|
min: 1.0
|
||||||
max: 100.0
|
max: 100.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
mode: slider
|
||||||
alarm_length_1:
|
|
||||||
name: "⏰ Alarm Length 1"
|
|
||||||
description: This is the start to finish time for the first run
|
|
||||||
default: 10
|
default: 10
|
||||||
|
alarm_length_1:
|
||||||
|
name: ⏰ Alarm Length 1
|
||||||
|
description: This is the start to finish time for the first run
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
min: 1.0
|
min: 1.0
|
||||||
max: 60.0
|
max: 60.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
mode: slider
|
||||||
|
default: 10
|
||||||
target_kelvin_2:
|
target_kelvin_2:
|
||||||
description: Target Kelvin value (cold) for second run
|
description: Target Kelvin value (cold) for second run
|
||||||
selector:
|
selector:
|
||||||
@ -134,23 +131,23 @@ blueprint:
|
|||||||
max_brightness_2:
|
max_brightness_2:
|
||||||
name: ⭐️ Maximum Brightness 2
|
name: ⭐️ Maximum Brightness 2
|
||||||
description: Finish value for second run
|
description: Finish value for second run
|
||||||
default: 50
|
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
min: 1.0
|
min: 1.0
|
||||||
max: 100.0
|
max: 100.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
mode: slider
|
||||||
|
default: 50
|
||||||
alarm_length_2:
|
alarm_length_2:
|
||||||
name: ⏰ Alarm length 2
|
name: ⏰ Alarm length 2
|
||||||
description: This is the start to finish time for the second run
|
description: This is the start to finish time for the second run
|
||||||
default: 10
|
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
min: 1.0
|
min: 1.0
|
||||||
max: 60.0
|
max: 60.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
mode: slider
|
||||||
|
default: 10
|
||||||
target_kelvin_3:
|
target_kelvin_3:
|
||||||
description: Target Kelvin value (cold) for third run
|
description: Target Kelvin value (cold) for third run
|
||||||
selector:
|
selector:
|
||||||
@ -161,56 +158,51 @@ blueprint:
|
|||||||
max_brightness_3:
|
max_brightness_3:
|
||||||
name: ⭐️ Maximum Brightness 3
|
name: ⭐️ Maximum Brightness 3
|
||||||
description: Finish value for third and final run
|
description: Finish value for third and final run
|
||||||
default: 100
|
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
min: 1.0
|
min: 1.0
|
||||||
max: 100.0
|
max: 100.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
mode: slider
|
||||||
|
default: 100
|
||||||
alarm_length_3:
|
alarm_length_3:
|
||||||
name: ⏰ Alarm Length 3
|
name: ⏰ Alarm Length 3
|
||||||
description: This is the start to finish time for the third run
|
description: This is the start to finish time for the third run
|
||||||
default: 5
|
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
min: 1.0
|
min: 1.0
|
||||||
max: 60.0
|
max: 60.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
mode: slider
|
||||||
|
default: 5
|
||||||
post_action:
|
post_action:
|
||||||
name: 🎮 Post Script Action
|
name: 🎮 Post Script Action
|
||||||
description: An action you want to run after the script has finished
|
description: An action you want to run after the script has finished
|
||||||
default: []
|
default: []
|
||||||
selector:
|
selector:
|
||||||
action: {}
|
action: {}
|
||||||
|
source_url: https://github.com/steku/ha_cercadian_alarm/blob/main/parabolic_alarm.yaml
|
||||||
trigger:
|
trigger:
|
||||||
- trigger: time
|
- trigger: time
|
||||||
at: !input alarm_start_time
|
at: !input alarm_start_time
|
||||||
|
|
||||||
condition:
|
condition:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: !input workday_sensor
|
entity_id: !input workday_sensor
|
||||||
state: "on"
|
state: "on"
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: !input person_sensor
|
entity_id: !input person_sensor
|
||||||
state: home
|
state: "home"
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- choose:
|
- choose:
|
||||||
- conditions: []
|
- conditions: []
|
||||||
sequence: !input pre_action
|
sequence: !input pre_action
|
||||||
|
|
||||||
- action: light.turn_on
|
- action: light.turn_on
|
||||||
target:
|
|
||||||
entity_id: !input target_light
|
|
||||||
data:
|
data:
|
||||||
color_temp_kelvin: !input start_kelvin_temp
|
color_temp_kelvin: !input start_kelvin_temp
|
||||||
brightness_pct: 1
|
brightness_pct: 1
|
||||||
|
entity_id: !input target_light
|
||||||
- delay: "00:00:05"
|
- delay:
|
||||||
|
seconds: 5
|
||||||
- action: !input alarm_script
|
- action: !input alarm_script
|
||||||
data:
|
data:
|
||||||
target_kelvin: !input target_kelvin_1
|
target_kelvin: !input target_kelvin_1
|
||||||
@ -220,30 +212,36 @@ action:
|
|||||||
steps_per_minute: !input steps_per_minute
|
steps_per_minute: !input steps_per_minute
|
||||||
light_timeout: 0
|
light_timeout: 0
|
||||||
target_light: !input target_light
|
target_light: !input target_light
|
||||||
|
- if:
|
||||||
- service: !input alarm_script
|
- condition: state
|
||||||
data:
|
state: "on"
|
||||||
target_kelvin: !input target_kelvin_2
|
entity_id: !input target_light
|
||||||
start_kelvin: !input target_kelvin_1
|
then:
|
||||||
max_brightness_pct: !input max_brightness_2
|
- action: !input alarm_script
|
||||||
alarm_length: !input alarm_length_2
|
data:
|
||||||
steps_per_minute: !input steps_per_minute
|
target_kelvin: !input target_kelvin_2
|
||||||
light_timeout: 0
|
start_kelvin: !input target_kelvin_1
|
||||||
target_light: !input target_light
|
max_brightness_pct: !input max_brightness_2
|
||||||
|
alarm_length: !input alarm_length_2
|
||||||
- service: !input alarm_script
|
steps_per_minute: !input steps_per_minute
|
||||||
data:
|
light_timeout: 0
|
||||||
target_kelvin: !input target_kelvin_3
|
target_light: !input target_light
|
||||||
start_kelvin: !input target_kelvin_2
|
- if:
|
||||||
max_brightness_pct: !input max_brightness_3
|
- condition: state
|
||||||
alarm_length: !input alarm_length_3
|
state: "on"
|
||||||
steps_per_minute: !input steps_per_minute
|
entity_id: !input target_light
|
||||||
light_timeout: !input light_timeout
|
then:
|
||||||
target_light: !input target_light
|
- action: !input alarm_script
|
||||||
|
data:
|
||||||
|
target_kelvin: !input target_kelvin_3
|
||||||
|
start_kelvin: !input target_kelvin_2
|
||||||
|
max_brightness_pct: !input max_brightness_3
|
||||||
|
alarm_length: !input alarm_length_3
|
||||||
|
steps_per_minute: !input steps_per_minute
|
||||||
|
light_timeout: !input light_timeout
|
||||||
|
target_light: !input target_light
|
||||||
- choose:
|
- choose:
|
||||||
- conditions: []
|
- conditions: []
|
||||||
sequence: !input post_action
|
sequence: !input post_action
|
||||||
|
|
||||||
mode: parallel
|
mode: parallel
|
||||||
max: 10
|
max: 10
|
||||||
|
|||||||
Reference in New Issue
Block a user