From a02e1b6973f9237f116f539205c7ecceea07538d Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Fri, 24 Jun 2022 18:47:28 -0400 Subject: [PATCH] Couple of changes to deal with the wife working later shifts --- packages/scheduling.yaml | 8 ++++++-- packages/security.yaml | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/scheduling.yaml b/packages/scheduling.yaml index be9cbea..7457f54 100644 --- a/packages/scheduling.yaml +++ b/packages/scheduling.yaml @@ -106,7 +106,7 @@ automation: alias: House Scheduling trigger: - platform: time - at: '05:45:00' + at: '05:50:00' id: house-morning - platform: time at: '16:05:00' @@ -145,7 +145,11 @@ automation: {% elif is_state('input_boolean.school_today','off') and is_state('input_boolean.work_today','off') %} 15:00 {% else %} - {{ (state_attr('input_datetime.tina_workday_end', 'timestamp') + 3600) | timestamp_custom('%H:%M', false) }} + {% if (state_attr('input_datetime.tina_workday_end','timestamp')) > 61200 %} + 16:00 + {% else %} + {{ (state_attr('input_datetime.tina_workday_end', 'timestamp') + 3600) | timestamp_custom('%H:%M', false) }} + {% endif %} {% endif %} - service: input_datetime.set_datetime entity_id: input_datetime.morning_alarm_disarm diff --git a/packages/security.yaml b/packages/security.yaml index 68db3fd..1174009 100644 --- a/packages/security.yaml +++ b/packages/security.yaml @@ -175,6 +175,9 @@ automation: - condition: state entity_id: input_boolean.guest_mode state: 'off' + - condition: time + after: '06:00' + before: '12:00' - condition: or conditions: - condition: state