tasmota-charge: fixes +
This commit is contained in:
parent
f5ab497bff
commit
f416852225
1 changed files with 8 additions and 1 deletions
|
@ -34,4 +34,11 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "turning plug $TURN_PLUG"
|
echo "turning plug $TURN_PLUG"
|
||||||
curl -s "http://$PLUG_IP/cm?cmnd=Power%20$TURN_PLUG"
|
if curl --silent "http://$PLUG_IP/cm?cmnd=Power%20$TURN_PLUG" | jq -r .POWER | grep -q "^$TURN_PLUG\$"
|
||||||
|
then
|
||||||
|
echo "SUCCESS"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "ERROR"
|
||||||
|
exit 53
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue