|
|
@@ -171,7 +171,7 @@ class SensorAPI(object): |
|
|
def get_sensor_value(self, id): |
|
|
def get_sensor_value(self, id): |
|
|
try: |
|
|
try: |
|
|
id = int(id) |
|
|
id = int(id) |
|
|
return int(self.cache.get("sensors")[id].instance.last_value) |
|
|
|
|
|
|
|
|
return float(self.cache.get("sensors")[id].instance.last_value) |
|
|
except Exception as e: |
|
|
except Exception as e: |
|
|
|
|
|
|
|
|
return None |
|
|
return None |
|
|
|