MCPcopy Create free account
hub / github.com/bdring/FluidNC / handle_humidity

Method handle_humidity

examples/http_command/http_command_server.py:136–143  ·  view source on GitHub ↗

Respond to /api/humidity with just humidity

(self)

Source from the content-addressed store, hash-verified

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"""

Callers 1

do_GETMethod · 0.95

Calls 1

send_json_responseMethod · 0.95

Tested by

no test coverage detected