mirror of
				https://github.com/home-assistant/core.git
				synced 2025-11-04 08:29:37 +00:00 
			
		
		
		
	Log delay and wait_template steps in scripts (#18448)
* Log delay and wait_template steps in scripts Help improve script debugging by logging delay and wait_template steps in scripts. * Update tests * Fix lint issue
This commit is contained in:
		
				
					committed by
					
						
						Paulus Schoutsen
					
				
			
			
				
	
			
			
			
						parent
						
							089a2f4e71
						
					
				
				
					commit
					83b4e56978
				
			@@ -120,6 +120,10 @@ class Script():
 | 
			
		||||
                                  self.name, ex)
 | 
			
		||||
                    break
 | 
			
		||||
 | 
			
		||||
                self.last_action = action.get(
 | 
			
		||||
                    CONF_ALIAS, 'delay {}'.format(delay))
 | 
			
		||||
                self._log("Executing step %s" % self.last_action)
 | 
			
		||||
 | 
			
		||||
                unsub = async_track_point_in_utc_time(
 | 
			
		||||
                    self.hass, async_script_delay,
 | 
			
		||||
                    date_util.utcnow() + delay
 | 
			
		||||
@@ -136,6 +140,9 @@ class Script():
 | 
			
		||||
                wait_template = action[CONF_WAIT_TEMPLATE]
 | 
			
		||||
                wait_template.hass = self.hass
 | 
			
		||||
 | 
			
		||||
                self.last_action = action.get(CONF_ALIAS, 'wait template')
 | 
			
		||||
                self._log("Executing step %s" % self.last_action)
 | 
			
		||||
 | 
			
		||||
                # check if condition already okay
 | 
			
		||||
                if condition.async_template(
 | 
			
		||||
                        self.hass, wait_template, variables):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user