Compare commits
No commits in common. "95a0f36bfa92bf20fef350710e99b5a212b90a81" and "4704023e960a69659c15eee001e4d143078e7e4e" have entirely different histories.
95a0f36bfa
...
4704023e96
7
main.py
7
main.py
|
@ -49,7 +49,7 @@ class SensorServer(Server):
|
|||
|
||||
if isWaterPresent != self.isWaterPresent:
|
||||
self.isWaterPresent = isWaterPresent
|
||||
#self.ntfy.message(f'Water is {self.waterTextValue()}')
|
||||
self.ntfy.message(f'Water is {self.waterTextValue()}')
|
||||
|
||||
def handlePath(self, path):
|
||||
if path == 'index.json':
|
||||
|
@ -75,12 +75,9 @@ class SensorServer(Server):
|
|||
)
|
||||
|
||||
def getReading(self):
|
||||
readings = self.getState()
|
||||
readings['is-water-present'] = 1 if readings['is-water-present'] else 0
|
||||
|
||||
return {
|
||||
'timestamp': util.datetimeISO8601(),
|
||||
'readings': readings
|
||||
'readings': self.getState()
|
||||
}
|
||||
|
||||
def getState(self):
|
||||
|
|
Loading…
Reference in New Issue