mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-09-05 09:28:45 +00:00
Wake up time based on holidays
This commit is contained in:
@@ -63,6 +63,7 @@ cards:
|
||||
- automation.sleep_mode_disable
|
||||
- automation.sleep_mode_toggle_on_bedside_switch_double_click
|
||||
- automation.alarm_wake_up
|
||||
- automation.alarm_set_time
|
||||
|
||||
- type: divider
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
input_datetime:
|
||||
alarm_time:
|
||||
name: Wake up Time
|
||||
name: Wake up time
|
||||
has_date: false
|
||||
has_time: true
|
||||
|
||||
@@ -104,3 +104,18 @@ automation:
|
||||
entity_id: media_player.master_bedroom
|
||||
data:
|
||||
volume_level: 0.3
|
||||
|
||||
- alias: Alarm · Set time
|
||||
trigger:
|
||||
platform: time
|
||||
at: "21:00:00"
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
data_template:
|
||||
entity_id: input_datetime.alarm_time
|
||||
time: >-
|
||||
{% if is_state('binary_sensor.workday_tomorrow', 'on') %}
|
||||
09:20:00
|
||||
{% else %}
|
||||
10:20:00
|
||||
{% endif %}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
binary_sensor:
|
||||
- platform: workday
|
||||
name: Workday today
|
||||
country: BG
|
||||
add_holidays:
|
||||
- '2020-04-20'
|
||||
- '2020-05-25'
|
||||
- '2020-09-07'
|
||||
- '2020-12-28'
|
||||
|
||||
- platform: workday
|
||||
name: Workday tomorrow
|
||||
days_offset: 1
|
||||
country: BG
|
||||
add_holidays:
|
||||
- '2020-04-20'
|
||||
- '2020-05-25'
|
||||
- '2020-09-07'
|
||||
- '2020-12-28'
|
||||
Reference in New Issue
Block a user