Mercurial > code > home > repos > homeauto
comparison service/arduinoNode/devices.py @ 1685:6b80a6c58907
minor changes to several services
author | drewp@bigasterisk.com |
---|---|
date | Mon, 27 Sep 2021 23:12:43 -0700 |
parents | 4880a9868673 |
children |
comparison
equal
deleted
inserted
replaced
1684:c41af73a410f | 1685:6b80a6c58907 |
---|---|
40 log.info('found %s, a %s', row.dev, cls.deviceType) | 40 log.info('found %s, a %s', row.dev, cls.deviceType) |
41 yield cls(graph, row.dev, int(row.pinNumber)) | 41 yield cls(graph, row.dev, int(row.pinNumber)) |
42 | 42 |
43 # subclasses may add args to this | 43 # subclasses may add args to this |
44 def __init__(self, graph, uri, pinNumber): | 44 def __init__(self, graph, uri, pinNumber): |
45 scales.init(self, self.__class__.__name__) | |
46 self._stats = scales.collection(self.__class__.__name__, | |
47 scales.PmfStat('poll'), | |
48 scales.PmfStat('output'), | |
49 ) | |
50 self.graph, self.uri = graph, uri | 45 self.graph, self.uri = graph, uri |
51 self.pinNumber = pinNumber | 46 self.pinNumber = pinNumber |
47 scales.init(self, self.__class__.__name__) | |
48 self.stats = scales.collection(self.__class__.__name__, | |
49 scales.PmfStat('poll'), | |
50 scales.PmfStat('output'), | |
51 ) | |
52 self.hostStateInit() | 52 self.hostStateInit() |
53 | 53 |
54 def hostStateInit(self): | 54 def hostStateInit(self): |
55 """ | 55 """ |
56 If you don't want to use __init__, you can use this to set up | 56 If you don't want to use __init__, you can use this to set up |