Respond to /api/humidity with just humidity
(self)
| 134 | self.send_json_response(response_data) |
| 135 | |
| 136 | def handle_humidity(self): |
| 137 | """Respond to /api/humidity with just humidity""" |
| 138 | response_data = { |
| 139 | "humidity": round(55 + random.uniform(-15, 15), 1), |
| 140 | "unit": "percent", |
| 141 | "timestamp": datetime.now().isoformat() |
| 142 | } |
| 143 | self.send_json_response(response_data) |
| 144 | |
| 145 | def handle_read(self): |
| 146 | """Respond to /api/read with multiple sensor values""" |
no test coverage detected