Compare commits

...

2 Commits

Author SHA1 Message Date
Mike Cifelli 95a0f36bfa
Convert boolean to int for Adafruit IO 2023-07-15 11:13:15 -04:00
Mike Cifelli 99810db877
Disable ntfy water alert 2023-07-15 11:04:23 -04:00
1 changed files with 5 additions and 2 deletions

View File

@ -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,9 +75,12 @@ 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': self.getState()
'readings': readings
}
def getState(self):