Skip to content

Commit

Permalink
feat(automation): update automation
Browse files Browse the repository at this point in the history
Signed-off-by: budimanjojo <[email protected]>
  • Loading branch information
budimanjojo committed Jun 26, 2024
1 parent ec1faab commit 18232d1
Showing 1 changed file with 4 additions and 25 deletions.
29 changes: 4 additions & 25 deletions automation/light.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 18232d1

Please sign in to comment.