From 18232d1ecff53b32de1e6f76d6b57eb81b6b1d37 Mon Sep 17 00:00:00 2001 From: budimanjojo Date: Wed, 26 Jun 2024 13:11:26 +0700 Subject: [PATCH] feat(automation): update automation Signed-off-by: budimanjojo --- automation/light.yaml | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/automation/light.yaml b/automation/light.yaml index 9b97ff2..4eeb674 100644 --- a/automation/light.yaml +++ b/automation/light.yaml @@ -146,7 +146,7 @@ target: entity_id: light.guest_bathroom -# Turn Off JOJO Bathroom Light When Not Occupied +# Turn Off JOJO Bathroom Light When Not Occupied and Sun is not Set - id: turn_off_jojo_bathroom_light_unoccupied alias: Turn Off JOJO Bathroom Light When Not Occupied @@ -160,6 +160,9 @@ - condition: state entity_id: light.jojo_bathroom state: 'on' + - condition: state + entity_id: sun.sun + state: "above_horizon" action: - service: light.turn_off @@ -186,30 +189,6 @@ target: entity_id: light.guest_bathroom -# Turn On JOJO Bedroom Hallway Light at Night -- id: turn_on_jojo_bedroom_hallway_light_at_night - alias: Turn On JOJO Bedroom Hallway Light at Night - - trigger: - - platform: time_pattern - minutes: '/1' - - condition: - - condition: state - entity_id: sun.sun - state: "below_horizon" - - condition: state - entity_id: light.jojo_bedroom_2 - state: 'off' - - condition: state - entity_id: group.jojo_family - state: 'home' - - action: - - service: light.turn_on - target: - entity_id: light.jojo_bedroom_2 - # Turn Off JOJO Bedroom Hallway Light in the Morning - id: turn_off_jojo_bedroom_hallway_light_in_morning alias: Turn Off JOJO Bedroom Hallway Light in the Morning