From 0483192e73af7b28042c2aafe572cc3625774982 Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Tue, 24 Nov 2026 15:38:58 -0500 Subject: [PATCH] Restore warm evening accents and refine TV arrival behavior --- .../Timed_Triggers/sunset_turn_on.yaml | 56 +++++++++++-------- config/packages/samsung_tv.yaml | 53 +++++++++++++++--- 2 files changed, 78 insertions(+), 31 deletions(-) diff --git a/config/automation/Timed_Triggers/sunset_turn_on.yaml b/config/automation/Timed_Triggers/sunset_turn_on.yaml index be602660..affc485e 100755 --- a/config/automation/Timed_Triggers/sunset_turn_on.yaml +++ b/config/automation/Timed_Triggers/sunset_turn_on.yaml @@ -8,6 +8,7 @@ # ------------------------------------------------------------------- # Notes: Normal sunset lighting is silent. Speech is reserved for an actionable # package, unlocked front door, open garage door, or open entry point. +# Notes: Use 2700 K for the living room accents after any entry alert clears. ###################################################################### - alias: 'Sunset Stuff on' @@ -98,11 +99,27 @@ - switch.office_accent - switch.living_room_outlet - switch.living_room_tv_outlet - - service: light.turn_on - entity_id: - - light.living_room_accents - - light.upstairs_lamp - - light.ikea_1 #Upstairs Hallyway switchoutlet. + - action: light.turn_on + target: + entity_id: + - light.upstairs_lamp + - light.ikea_1 # Upstairs hallway + - alias: Set warm living room accents when the alert clears + sequence: &warm_living_room_accents + - wait_template: >- + {{ is_state('group.entry_points', 'off') and + is_state('group.garage_doors', 'closed') and + is_state_attr('automation.living_room_red_on_entry_garage_open', 'current', 0) }} + timeout: '00:10:00' + - if: + - condition: template + value_template: "{{ wait.completed }}" + then: + - action: light.turn_on + target: + entity_id: light.living_room_accents + data: + color_temp_kelvin: 2700 - conditions: - condition: state entity_id: input_boolean.vacation_mode @@ -122,11 +139,12 @@ - switch.office_accent - switch.living_room_outlet - switch.living_room_tv_outlet - - service: light.turn_on - entity_id: - - light.living_room_accents - - light.upstairs_lamp - - light.ikea_1 #Upstairs Hallyway switchoutlet. + - action: light.turn_on + target: + entity_id: + - light.upstairs_lamp + - light.ikea_1 # Upstairs hallway + - sequence: *warm_living_room_accents - conditions: - condition: state entity_id: input_boolean.vacation_mode @@ -160,20 +178,10 @@ - switch.foyer_outlet - switch.living_room_outlet - switch.front_office_lamp - - choose: - - conditions: - - condition: template - value_template: "{{ vacation_presence_light == 'light.upstairs_lamp' }}" - sequence: - - service: light.turn_on - entity_id: - - light.living_room_accents - - light.upstairs_lamp - default: - - service: light.turn_on - entity_id: - - light.living_room_accents - - light.ikea_1 + - action: light.turn_on + target: + entity_id: "{{ vacation_presence_light }}" + - sequence: *warm_living_room_accents - delay: "{{ vacation_presence_runtime }}" - condition: state entity_id: input_boolean.vacation_mode diff --git a/config/packages/samsung_tv.yaml b/config/packages/samsung_tv.yaml index f0043505..f405bec8 100644 --- a/config/packages/samsung_tv.yaml +++ b/config/packages/samsung_tv.yaml @@ -19,6 +19,7 @@ # Notes: Recover only this Roku integration after bridge-detected reconnects. # Notes: Raven restores its state and is re-enabled daily at 03:00. # Notes: First parent arrival after the family is away wakes the TV and opens Raven. +# Notes: With the TV off, a parent arrival also runs if the other has been home for 30 minutes. # Notes: Arrival wakes the TV through Roku Home, which can start the Raven exit timer. # Notes: Arrival retries Roku Home if TV power is not confirmed after a command. # Notes: TV-off is normal and remains outside always-on kiosk health alerts. @@ -66,22 +67,60 @@ rest: automation: - id: living_room_raven_on_family_arrival alias: Living Room TV - Open Raven on Family Arrival - description: Use Roku Home to wake the TV and open Raven when Carlo or Stacey returns to an empty house. + description: Open Raven on a parent arrival to an empty house or to a TV that is off after the other parent has been home for 30 minutes. mode: single triggers: - trigger: state + id: empty_house entity_id: group.family from: not_home to: home + - trigger: state + id: carlo_arrives + entity_id: person.carlo + not_from: [unknown, unavailable] + to: home + - trigger: state + id: stacey_arrives + entity_id: person.stacey + not_from: [unknown, unavailable] + to: home conditions: - condition: or conditions: - - condition: state - entity_id: person.carlo - state: home - - condition: state - entity_id: person.stacey - state: home + - condition: and + conditions: + - condition: trigger + id: empty_house + - condition: state + entity_id: [person.carlo, person.stacey] + match: any + state: home + - condition: and + conditions: + - condition: media_player.is_off + target: + entity_id: media_player.samsung_q70_series_65 + - condition: or + conditions: + - condition: and + conditions: + - condition: trigger + id: carlo_arrives + - condition: state + entity_id: person.stacey + state: home + for: + minutes: 30 + - condition: and + conditions: + - condition: trigger + id: stacey_arrives + - condition: state + entity_id: person.carlo + state: home + for: + minutes: 30 - condition: state entity_id: input_boolean.haven state: 'on'