Пример #1
0
 def __init__(self, name, description, connector, data={}, monitors=[]):
     Station.__init__(self, name, description, connector, data=data, monitors=monitors)
     self.on = False
Пример #2
0
 def __init__(self, name, description, connector, data={}, monitors=[]):
     StoppableThread.__init__(self)
     Station.__init__(self, name, description, connector, data=data, monitors=monitors)
     self.pattern = re.compile('\w+:\d+')
     self.mapping = {'TEMP' : 'temperature', 'HUM' : 'humidity', 'LIGHT' : 'brightness', 'TIME' : 'time' }
     self.types = {'TEMP' : float, 'HUM' : float, 'LIGHT' : float, 'TIME' : int }