diff --git a/main.py b/main.py index 972a021..4591f22 100644 --- a/main.py +++ b/main.py @@ -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):