コード例 #1
0
 def __init__(self, thing, data):
     Event.__init__(self, thing, 'proximity', data=data)
     if self.data is True:
         GPIO.output(24, GPIO.HIGH)
         thing.properties['led'].value.last_value = True
     elif self.data is False:
         GPIO.output(24, GPIO.LOW)
         thing.properties['led'].value.last_value = False
コード例 #2
0
 def __init__(self, thing, data):
     Event.__init__(self, thing, 'overheated', data=data)
コード例 #3
0
 def __init__(self, thing, data):
     logging.debug("Overheated event")
     Event.__init__(self, thing, 'overheated', data=data)
コード例 #4
0
 def __init__(self, thing, data=None):
     Event.__init__(self, thing, name='alarm', data=data)
     logging.debug("Alarm event")
コード例 #5
0
 def __init__(self, thing, data):
     Event.__init__(self, thing, 'proximity', data=data)
コード例 #6
0
 def __init__(self, thing, data):
     """Initialize the event."""
     Event.__init__(self, thing, 'playlistUpdated', data=data)
コード例 #7
0
ファイル: test.py プロジェクト: liuxing3169/thingtalk
 def __init__(self, thing, data):
     Event.__init__(self, thing, "overheated", data=data)