| 
									
										
										
										
											2018-01-01 19:00:45 -05:00
										 |  |  | ###################################
 | 
					
						
							|  |  |  | ##  Sunrise and Sunset stuff
 | 
					
						
							|  |  |  | # @CCOSTAN
 | 
					
						
							|  |  |  | # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
 | 
					
						
							|  |  |  | ###################################
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - alias: 'Sunset Stuff on'
 | 
					
						
							|  |  |  |   trigger:
 | 
					
						
							|  |  |  |     - platform: state
 | 
					
						
							|  |  |  |       entity_id: sun.sun
 | 
					
						
							|  |  |  |       to: 'below_horizon'
 | 
					
						
							|  |  |  |       from: 'above_horizon'
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   action:
 | 
					
						
							| 
									
										
										
										
											2018-03-17 00:56:57 -04:00
										 |  |  |     - service: script.tweet_engine_image
 | 
					
						
							| 
									
										
										
										
											2018-01-01 19:00:45 -05:00
										 |  |  |       data_template:
 | 
					
						
							| 
									
										
										
										
											2018-03-17 00:56:57 -04:00
										 |  |  |         tweet: >-
 | 
					
						
							| 
									
										
										
										
											2018-01-01 19:00:45 -05:00
										 |  |  |           {{ [
 | 
					
						
							|  |  |  |           "Right before sunset, I turn on the outdoor lights.",
 | 
					
						
							| 
									
										
										
										
											2018-01-17 11:39:08 -05:00
										 |  |  |           "Since it gets dark around sunset, I will turn on the landscaping lights.",
 | 
					
						
							| 
									
										
										
										
											2018-01-12 17:50:45 -05:00
										 |  |  |           "Time to turn on the Landscaping lights.",
 | 
					
						
							|  |  |  |           "Daytime is over, Time to turn on the exterior lights.",
 | 
					
						
							| 
									
										
										
										
											2018-01-17 11:39:08 -05:00
										 |  |  |           "Once the Sun goes down, we turn on the exterior lights.",
 | 
					
						
							| 
									
										
										
										
											2018-01-01 19:00:45 -05:00
										 |  |  |           "Since it is sunset, I will turn on the exterior lights."
 | 
					
						
							|  |  |  |           ] | random + [
 | 
					
						
							| 
									
										
										
										
											2018-01-12 11:13:55 -05:00
										 |  |  |           " #Sunset",
 | 
					
						
							|  |  |  |           " #HomeAutomation",
 | 
					
						
							|  |  |  |           " #AccentLighting",
 | 
					
						
							|  |  |  |           " (http://www.vmwareinfo.com/2017/08/diy-outdoor-smart-home-led-strips.html)"
 | 
					
						
							| 
									
										
										
										
											2018-01-01 19:00:45 -05:00
										 |  |  |           ] | random }}
 | 
					
						
							| 
									
										
										
										
											2018-03-17 00:56:57 -04:00
										 |  |  |         image: >-
 | 
					
						
							|  |  |  |           {{ [
 | 
					
						
							|  |  |  |           "/config/www/custom_ui/floorplan/images/branding/light.png",
 | 
					
						
							|  |  |  |           "/config/www/custom_ui/floorplan/images/branding/light2.png",
 | 
					
						
							|  |  |  |           "/config/www/custom_ui/floorplan/images/branding/light3.png",
 | 
					
						
							| 
									
										
										
										
											2018-03-17 20:11:11 -04:00
										 |  |  |           "/config/www/custom_ui/floorplan/images/branding/light4.png",
 | 
					
						
							| 
									
										
										
										
											2018-04-06 21:46:54 -04:00
										 |  |  |           "/config/www/custom_ui/floorplan/images/branding/landscape_light.png",
 | 
					
						
							|  |  |  |           "/config/www/custom_ui/floorplan/images/branding/sunset.png"
 | 
					
						
							| 
									
										
										
										
											2018-03-17 00:56:57 -04:00
										 |  |  |           ] | random }}
 | 
					
						
							| 
									
										
										
										
											2018-01-01 19:00:45 -05:00
										 |  |  |     - delay: '00:{{ (range(1, 20)|random|int) }}:00'
 | 
					
						
							|  |  |  |     - service: script.speech_engine
 | 
					
						
							|  |  |  |       data:
 | 
					
						
							|  |  |  |         call_dark_outside: 1
 | 
					
						
							|  |  |  |         call_window_check: 1
 | 
					
						
							|  |  |  |     - service: homeassistant.turn_on
 | 
					
						
							|  |  |  |       entity_id:
 | 
					
						
							|  |  |  |         - switch.front_landscaping
 | 
					
						
							|  |  |  |     - service: script.monthly_color_scene
 | 
					
						
							|  |  |  |     - service: light.turn_on
 | 
					
						
							| 
									
										
										
										
											2018-01-14 18:34:45 -05:00
										 |  |  |       entity_id: light.outdoor_bathroom
 | 
					
						
							| 
									
										
										
										
											2018-01-01 19:00:45 -05:00
										 |  |  |       data:
 | 
					
						
							| 
									
										
										
										
											2018-01-14 18:35:56 -05:00
										 |  |  |         brightness: 20
 | 
					
						
							| 
									
										
										
										
											2018-01-01 19:00:45 -05:00
										 |  |  |     - wait_template: >-
 | 
					
						
							|  |  |  |        {{ states.group.family.state == 'home' }}
 | 
					
						
							|  |  |  |     - service: switch.turn_on
 | 
					
						
							|  |  |  |       entity_id:
 | 
					
						
							|  |  |  |        - switch.master_bathroom_accents
 | 
					
						
							|  |  |  |        - switch.back_landscaping
 | 
					
						
							|  |  |  |        - switch.front_door_outlet
 | 
					
						
							|  |  |  |        - switch.living_room_outlet
 | 
					
						
							|  |  |  |        - switch.den_outlet
 | 
					
						
							|  |  |  |        - switch.foyer_outlet
 | 
					
						
							|  |  |  |     - service: light.turn_on
 | 
					
						
							|  |  |  |       entity_id:
 | 
					
						
							|  |  |  |        - group.living_room_accents
 | 
					
						
							|  |  |  |        - light.bedroom
 | 
					
						
							|  |  |  |     - wait_template: >-
 | 
					
						
							|  |  |  |        {{ is_state('group.garage_doors', 'closed') }}
 | 
					
						
							|  |  |  |     - wait_template: >-
 | 
					
						
							|  |  |  |        {{ is_state('group.entry_points', 'off') }}
 | 
					
						
							|  |  |  |     - service: script.speech_engine
 | 
					
						
							|  |  |  |       data:
 | 
					
						
							|  |  |  |        call_garage_check: 1
 | 
					
						
							|  |  |  |        call_window_check: 1
 |