v0.4.2
This commit is contained in:
@@ -45,6 +45,11 @@ curl -fsS -X POST -H 'Content-Type: application/json' \
|
||||
-d '{"name":"Test","device_id":"sim-salon","enabled":true,"mode":"cool","setpoint":23,"hysteresis":0.6,"min_on_seconds":0,"min_off_seconds":0,"sensor_source":"device"}' \
|
||||
"http://127.0.0.1:$PORT/api/zones" >"$TMP/zone.json"
|
||||
grep -q '"name":"Test"' "$TMP/zone.json"
|
||||
ZONE_ID="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["id"])' "$TMP/zone.json")"
|
||||
sleep 3
|
||||
curl -fsS "http://127.0.0.1:$PORT/api/history?zone_id=$ZONE_ID&hours=1" >"$TMP/history.json"
|
||||
grep -q '"readings"' "$TMP/history.json"
|
||||
grep -q '"control_temperature"' "$TMP/history.json"
|
||||
|
||||
curl -fsS "http://127.0.0.1:$PORT/api/readings?device_id=sim-salon&hours=1" >"$TMP/readings.json"
|
||||
grep -q '"readings"' "$TMP/readings.json"
|
||||
|
||||
Reference in New Issue
Block a user