Skip to content

Commit

Permalink
Turn off morning lights after sunrise (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
tetsuo13 committed Feb 23, 2024
1 parent 650d968 commit bcc9fdc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
17 changes: 12 additions & 5 deletions automation/lights.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@
transition: 1800

- alias: Turn Off Lights Before Work
id: turn_off_lights_before_work
description: >-
Turn off lights weekday mornings 15 minutes after sunrise.
initial_state: true
trigger:
platform: time
at: "07:45:00"
platform: sun
event: sunrise
offset: "00:15:00"
condition:
- condition: time
weekday:
Expand Down Expand Up @@ -89,11 +93,14 @@
entity_id: light.controller_rgb_44_key_ir_cde6d9
brightness: 13

- alias: Turn Off Night-Light 8:00am
- alias: Turn Off Night-Light After Sunrise
id: turn_off_night_light_after_sunrise
description: Turn off night-light 15 minutes after sunrise.
initial_state: true
trigger:
platform: time
at: "08:00:00"
platform: sun
event: sunrise
offset: "00:15:00"
action:
service: light.turn_off
data:
Expand Down
4 changes: 2 additions & 2 deletions customize/automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ automation.turn_on_night_light_at_sunset:
friendly_name: Turn On Night-Light at Sunset
icon: mdi:led-strip

automation.turn_off_night_light_8_00am:
friendly_name: Turn Off Night-Light 8:00am
automation.turn_off_night_light_after_sunrise:
friendly_name: Turn Off Night-Light After Sunrise
icon: mdi:led-strip

automation.turn_on_dining_room_lamp_before_sunset:
Expand Down
2 changes: 1 addition & 1 deletion lovelace/views/automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cards:
- entity: automation.turn_off_outside_lights_sunrise
- entity: automation.turn_on_outside_lights_sunset
- entity: automation.turn_on_night_light_at_sunset
- entity: automation.turn_off_night_light_8_00am
- entity: automation.turn_off_night_light_after_sunrise
- entity: automation.turn_on_dining_room_lamp_before_sunset
- entity: automation.turn_off_dining_room_lamp

0 comments on commit bcc9fdc

Please sign in to comment.