| 
									
										
										
										
											2018-01-01 19:00:45 -05:00
										 |  |  | ######################################################################
 | 
					
						
							|  |  |  | ##  Stuff that needs to happen after 10pm.
 | 
					
						
							|  |  |  | ######################################################################
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - alias: Automated NIGHT WatchDog!
 | 
					
						
							| 
									
										
										
										
											2020-07-20 19:33:03 +01:00
										 |  |  |   id: 4ce973ea-b78a-4440-99d1-7f8eb4400eab
 | 
					
						
							| 
									
										
										
										
											2018-01-01 19:00:45 -05:00
										 |  |  |   trigger:
 | 
					
						
							|  |  |  |     - platform: state
 | 
					
						
							| 
									
										
										
										
											2019-03-20 18:03:58 -04:00
										 |  |  |       entity_id: switch.lr_amp
 | 
					
						
							| 
									
										
										
										
											2018-01-01 19:00:45 -05:00
										 |  |  |       to: 'on'
 | 
					
						
							|  |  |  |       for: '00:10:00'
 | 
					
						
							|  |  |  |     - platform: state
 | 
					
						
							|  |  |  |       entity_id: media_player.livingroomCC
 | 
					
						
							|  |  |  |       to: 'off'
 | 
					
						
							|  |  |  |       for: '00:02:00'
 | 
					
						
							|  |  |  |     - platform: state
 | 
					
						
							|  |  |  |       entity_id: media_player.whole_house
 | 
					
						
							|  |  |  |       to: 'off'
 | 
					
						
							|  |  |  |       for: '00:02:00'
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   condition:
 | 
					
						
							|  |  |  |     condition: or
 | 
					
						
							|  |  |  |     conditions:
 | 
					
						
							|  |  |  |       - condition: and
 | 
					
						
							|  |  |  |         conditions:
 | 
					
						
							|  |  |  |           - condition: state
 | 
					
						
							|  |  |  |             entity_id: group.family
 | 
					
						
							|  |  |  |             state: 'not_home'
 | 
					
						
							|  |  |  |           - condition: state
 | 
					
						
							|  |  |  |             entity_id: input_boolean.guest_mode
 | 
					
						
							|  |  |  |             state: 'off'
 | 
					
						
							|  |  |  |       - condition: and
 | 
					
						
							|  |  |  |         conditions:
 | 
					
						
							|  |  |  |           - condition: state
 | 
					
						
							|  |  |  |             entity_id: input_boolean.guest_mode
 | 
					
						
							|  |  |  |             state: 'off'
 | 
					
						
							|  |  |  |           - condition: state
 | 
					
						
							|  |  |  |             entity_id: group.bed
 | 
					
						
							|  |  |  |             state: 'on'
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   action:
 | 
					
						
							|  |  |  |     - service: switch.turn_off
 | 
					
						
							|  |  |  |       data_template:
 | 
					
						
							|  |  |  |         entity_id: "{{ trigger.entity_id }}"
 |