Example #1
0
	def poll(self):
		'''checks to see if we should change state'''
		if not SUPPORTED:
			return False

		idleTime = idle.getIdleSec()
		
		# xa is stronger than away so check for xa first
		if idleTime > self.xa_interval:
			self.state = STATE_XA
		elif idleTime > self.away_interval:
			self.state = STATE_AWAY
		else:
			self.state = STATE_AWAKE
		return True
Example #2
0
 def getIdleSec(self):
     return idle.getIdleSec()
Example #3
0
 def getIdleSec(self):
     return idle.getIdleSec()