Hamas has called on Iran to avoid directing its retaliation toward neighbouring countries as tensions escalate with Israel and the United States.