######################################### # # Light Based Scripts # ######################################### # Turn on Living Room Lights if sun is down or cloud coverage is above 70% livingroom_lamps_on: sequence: - condition: or conditions: - condition: state entity_id: sun.sun state: 'below_horizon' - service: scene.turn_on entity_id: scene.normal_livingroom_lighting # Turn off Living Room Lights if sun is up and cloud coverage is below 70% livingroom_lamps_off: sequence: - condition: and conditions: - condition: state entity_id: sun.sun state: 'above_horizon' - service: group.turn_off entity_id: group.livingroom_lamps good_night_loft: sequence: - condition: state entity_id: media_player.pn60e550_pn60e550 state: "off" - service: switch.turn_off entity_id: switch.croft_fan - service: switch.turn_off entity_id: switch.croft_light kitchen_lights_on: sequence: - condition: state entity_id: sun.sun state: 'below_horizon' - condition: time after: '05:30:00' before: '22:30:00' - service: scene.turn_on entity_id: scene.normal_kitchen_lighting kitchen_lights_night: sequence: - condition: and conditions: - condition: state entity_id: sun.sun state: 'below_horizon' - condition: time after: '22:30:00' before: '05:30:00' - service: scene.turn_on entity_id: scene.diminished_kitchen_lighting - delay: minutes: 18 - service: light.turn_off entity_id: light.kitchen_cabinets theater_lights_out: sequence: - condition: state entity_id: media_player.home_theater state: 'idle' - delay: minutes: 30 - service: scene.turn_on entity_id: scene.theater_dark theater_lights_down: sequence: - service: scene.turn_on entity_id: scene.theater_dim - delay: minutes: 1 - service: scene.turn_on entity_id: scene.theater_dark theater_lights_up_check: sequence: - delay: seconds: 20 - service: script.turn_on entity_id: script.theater_lights_up theater_lights_up: sequence: - condition: state entity_id: media_player.home_theater state: 'idle' - service: scene.turn_on entity_id: scene.theater_dim - delay: minutes: 1 - service: scene.turn_on entity_id: scene.theater_bright - delay: minutes: 5 - service: script.turn_on entity_id: script.theater_lights_out