v0.11.6
This commit is contained in:
@@ -8,6 +8,6 @@ bb7cd2c5b27c9dceec1d1d2846fbad9600df9c08e0ad07d13fcde97af533091c ./install.sh
|
||||
e00d211e3885e30d7fed1e43b44e6fdad40a67019060156c0641816a93e3365f ./network-debug.sh
|
||||
01952aa92b217f8eae2493b88870e2dec595100cd15c4d561ff11ae2b936c46f ./regenerate-sha.sh
|
||||
81345b6a0b51736bdbc98fd23199b62e4c721b4e7437e02dab7ea79b97dff29a ./service.sh
|
||||
fec8b0362e763bbc115b5cc5c56f9ebe815730cee161632d81c5dc0ee1475f80 ./smoke.sh
|
||||
e16483e9afcea50ca92fa2ccf4ec5e5a2cc46b68b157865d20b09829b5fe9ed3 ./smoke.sh
|
||||
b50782b3742dfbf8a319c60571c968e93fdf8547db747c759edcffae68cb98bf ./update.sh
|
||||
4877f9e8217b6a77fb416722c3778373edac874ed3a583bb016ea76d4ffee7d4 ./verify_flow_logic.py
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+29
@@ -41,6 +41,11 @@ curl -fsS -X POST -H 'Content-Type: application/json' \
|
||||
"http://127.0.0.1:$PORT/api/devices/sim-salon/command" >"$TMP/command.json"
|
||||
grep -q '"power":true' "$TMP/command.json"
|
||||
|
||||
curl -fsS -X POST \
|
||||
"http://127.0.0.1:$PORT/api/devices/sim-salon/probe" >"$TMP/probe.json"
|
||||
grep -q '"ok":true' "$TMP/probe.json"
|
||||
grep -q '"response_time_ms":0' "$TMP/probe.json"
|
||||
|
||||
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"
|
||||
@@ -181,4 +186,28 @@ curl -fsS -X POST -H "Authorization: Bearer $HA_ACCESS_TOKEN" -H 'Content-Type:
|
||||
"http://127.0.0.1:$PORT/api/integrations/home-assistant/devices/sim-salon/command" >"$TMP/ha-command.json"
|
||||
grep -q '"power":false' "$TMP/ha-command.json"
|
||||
|
||||
# Disabled thermostat zones require an explicit direct-control override on the admin API,
|
||||
# while the restricted Home Assistant direct-device endpoint stays blocked.
|
||||
curl -fsS "http://127.0.0.1:$PORT/api/zones/$ZONE_ID" >"$TMP/zone-before-disable.json"
|
||||
python3 - "$TMP/zone-before-disable.json" "$TMP/zone-disable.json" <<'PYZONE'
|
||||
import json,sys
|
||||
zone=json.load(open(sys.argv[1]))
|
||||
zone["enabled"]=False
|
||||
json.dump(zone,open(sys.argv[2],"w"))
|
||||
PYZONE
|
||||
curl -fsS -X PUT -H 'Content-Type: application/json' --data-binary @"$TMP/zone-disable.json" \
|
||||
"http://127.0.0.1:$PORT/api/zones/$ZONE_ID" >"$TMP/zone-disabled.json"
|
||||
grep -q '"enabled":false' "$TMP/zone-disabled.json"
|
||||
BLOCKED_STATUS="$(curl -sS -o "$TMP/blocked-manual.json" -w '%{http_code}' -X POST -H 'Content-Type: application/json' \
|
||||
-d '{"power":true}' "http://127.0.0.1:$PORT/api/devices/sim-salon/command")"
|
||||
[[ "$BLOCKED_STATUS" == "400" ]]
|
||||
grep -q 'manual_override=true' "$TMP/blocked-manual.json"
|
||||
curl -fsS -X POST -H 'Content-Type: application/json' \
|
||||
-d '{"power":true,"manual_override":true}' \
|
||||
"http://127.0.0.1:$PORT/api/devices/sim-salon/command" >"$TMP/override-manual.json"
|
||||
grep -q '"power":true' "$TMP/override-manual.json"
|
||||
HA_BLOCKED_STATUS="$(curl -sS -o "$TMP/ha-blocked-manual.json" -w '%{http_code}' -X POST -H "Authorization: Bearer $HA_ACCESS_TOKEN" -H 'Content-Type: application/json' \
|
||||
-d '{"power":false}' "http://127.0.0.1:$PORT/api/integrations/home-assistant/devices/sim-salon/command")"
|
||||
[[ "$HA_BLOCKED_STATUS" == "400" ]]
|
||||
|
||||
echo "Smoke test OK (port $PORT)"
|
||||
|
||||
Executable → Regular
Executable → Regular
Reference in New Issue
Block a user